How do you know if you genuinely like someone or if you want to be with someone to boost your ego?

27 years old and just now realizing I’m not sure I’ve ever genuinely liked someone romantically for THEM as a person more than I craved and enjoyed the attention and boost to my ego. Help?