As-Salaam alaikum,
In Ayat 21 of Surat Ahzab of the Holy Qur'an (33:21), Allah Tabaraka Wa Ta'ala 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."

In view of this, since our object is Allah Ta'ala and the Final Day, we are charged to follow the Prophetic guidance shown by Prophet Muhammad, Sallallahu alaihi Wasallam-- the guidance referred to as "a beautiful example.." that Allah loves. Spiritual teachers of old 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". (3:31)

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, alaihis-Salaat Was-Salaam, quotes the words of Allah, Jallah-Jalalahu:

"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."
[Bukhari, Hadith No. 6502].