OK -- I hope this is hugely helpful and taken in the friendly spirit I intend. It's a bible verse related to whether or not someone truly knows God. 1 John 2:3 says, "And by this we know that we have come to know him, if we keep his commandments." Which is to say that if we don't keep God's rules, then we don't have the same assurance that we actually belong to him. On the other hand, it's a good sign if you care! That "assurance of salvation" is of extremely heavy importance, second only to salvation itself, the heaviest topic, due to how great God and heaven are, how terrible hell is, and the duration involved. As they say, forever is a long time.
If you think you're "saved", but you don't follow God's ways at all, why should anyone believe you? Are you sure you're saved?
About salvation...it's indeed a free gift, given to those who have faith (John 3:16; Romans 3:20-22; Romans 6:23; Ephesians 2:8-9, etc.). At the same time, after you come to faith in Jesus, bring on the good works!
Please look for yourself. Read 2 Peter 3-11, and notice what it says about leaving your past ways behind, and making sure about your calling and election. Notice also the progression in verses 5 through 7, where it starts with faith, but adds "virtue", which may also be called "goodness" or "moral excellence". Keep God's commandments, by faith!
Ephesians 2:8-9 (referenced above) teaches that people are saved by the grace of God, through faith. But verse 10 says that believers are "created in Christ Jesus for good works." That's such a profound statement, and directly correlates with keeping God's commandments...the very purpose for our re-creation is so that we may take part in good works.
If you consider yourself a believer, you must trust the Lord to help you do all the things he wants you to do. There are actually many, many verses in the Bible about the importance of following God's ways, keeping his commandments, and the idea that if you won't follow God's ways, you lose your certainty of being saved. If you want me to propose some additional verses, please leave me a comment. Or ask any question you'd like to ask.
May the Lord bless you and keep you!