As-Salaam alaikum,
In Ayat 21 of Surat Ahzab of the Holy Qur'an (33:21), Allah Azzah Wa Jallah says:--

"You have indeed in the Apostle of Allah a beautiful pattern (of conduct),
for anyone whose hope is in Allah and the Final Day, and who engages
much in the praise of Allah."

Since our object is Allah, Subhanahu Wa Ta'ala, and the Final Day, we are charged to follow the Prophetic guidance taught by Prophet Muhammad- the guidance referred to as "a beautiful example..." that Allah loves. Spiritual teachers have always told us that the Prophet's beautiful example primarily lies in the inner qualities of his soul... designated by his compassion, justice, generosity, forgiveness etc We should imitate him in this, Sallallahu alaihi Wasallam, by obeying the rules of Islamic Shari'a and overcoming everyday forgetfulness of the soul.

This is closely related with the teaching in Ayat 31 of Surat Ali-Imran of the Holy Qur'an:--

"Say: If you love Allah, follow me, and Allah will love you and
forgive you your sins."

In otherwords, the way to become worthy of Allah's Love is to follow Prophetic guidance. The goal of following this guidance is explained by a famous Hadith Qudsi in which the Prophet, alaihi-Salatu-Wassalam, quotes the words of Allah, Subhanahu Wa Ta'ala:--

"When My Servant approaches Me through good works, then I love him.
When I love him, I am the hearing with which he hears, the eye with which
he sees, the hand with which he grasps, and the foot with which he walks."