Jesus said expressed this idea most directly in Mat 10:37 He that loveth father or mother more than me is not worthy of me: and he that loveth son or daughter more than me is not worthy of me. (KJV)).
However, this is not a command. It is an option, a choice. We do this to become worthy of what love of Jesus can do for us.
However, Jesus’s words are captured in Greek and the Greek word translated as “love” in this verse (φιλῶν, phileo) does not mean “love” in the ways that our English word does. In English, the word has many uses, from romance to “love” of a country. There are four different words in ancient Greek that are translated as “love”, but only two that Christ uses. See this article for more information.
The word used here is closer to “caring” both in the sense of caring for” and “caring about”, often as a duty or a responsibility, than the more emotional senses of our word.
It is also a more of a comparative word that our word in English. It is often used in the sense here, caring more or less for one thing than another.