There is a popular doctrine making the rounds in churches and spreading like wildfire: You can’t do anything to make God love you less. Nor can you do anything to make God love you more.
A similar doctrine seen in a recent tweet is: The gift of JESUS has never been about earning and deserving. It has always been about Believing and Receiving.
Of course those going to Heaven will be the deserving. They loved the Lord and kept his Commandments and the Lord loved them more for it because they chose to walk in the light.
They believed and did not despise his sacrifice and reject his gift. Their belief included duty and obedience, repentance and confession, honor and respect. They received the gift of salvation with zeal and remembered Jesus died showing us to not sin.
Can you earn God’s love and favor. Of course you can. King David was a man after God’s own heart. Why, because King David did that which was right in the eyes of the Lord.