Christ teaches us this in summary in Matthew 22:37-40:
“You shall love the Lord your God with all your heart and with all your soul and with all your mind and with all your strength.” This is the greatest and first commandment.
And a second is like it: “You shall love your neighbor as yourself.”
On these two commandments hang all the Law and the Prophets.
(Heidelberg Catechism, Q. 4)