"I have hidden Your Word in my heart that I might not sin against you."
This psalm shows us that there is a need to not sin against God. It also shows us that there is a way to not sin (by hiding God's Word in your heart).
This is not to say we are sinless people. The Bible says that we have all sinned and fall short of the glory of God, which is why we need a Savior. However, the point here is that we are more likely to live in a manner pleasing to God by hiding His Word in our hearts. But what exactly does that mean?
By studying God's Word, memorizing His promises and meditating on them to gain insight and understand their meaning. When we know God's Word well, it becomes part of us - shaping our thinking, our values, and our behavior.