Religion follows the rules; relationships follow the heart. Relationships have boundaries that, if crossed, affect the relationship and can even end it. But religion does not have a relationship as it is too caught up in keeping score. And the score does not have balanced weights. Religion keeps score by deducting points for the person caught in sin while adding points to self for good intentions even if it leads to sin.
There are rules for healthy relationships, but rules can't dominate the relationship, or there won't be a relationship. People make marriage vows. But if vows are rehearsed daily to ensure your partner follows them, the marriage will crumble. Wherever we focus, it will be our path. If rules and laws, we draw close to rules and laws even when we can't meet them. If we have a relationship, then we will draw closer to the relationship. But relationships do have boundaries that are not to be crossed. There are relational rules.
A few rules to have a happy relationship with God are as follows: prayer, scripture reading, giving to others as has been given to us, praise and worship, and having ears to hear. Let me list some case studies of rules over relationships that you can investigate later.
Prayer: We have a man praying to himself in the temple, thanking God that he is not like other men. Religious people make long and repetitious prayers, thinking in an abundance of words and self-sacrifice God will hear them. At the end of time, a crowd of preachers will give a list of their sacrifices in the name of Jesus, and Jesus will tell them I don't know you, depart from me. Prayer is not listing our accomplishments before a holy God. It is knowing that we have access to the throne of God through Jesus's sacrifice and not our own.