Everything that follows is from the perspective of a learning player who also struggled with ranges for a while. I had this idea of what my 'range' was, but I had little real understanding of why, or of the importance of position, and the reality was that I made uninformed excuses to break from my range so often I may as well have not had one. My game has definitely improved since I got serious about my pre flop range, and did a lot of reading/watching on the subject.
Look at your opening ranges, and go look up several examples of standard/advised opening ranges for the type of game you play most often. Read up on just why the correct range is important, and take some time to really think about it. Make sure your range is positionally correct, eg you might be playing 10% UTG but 50% on the button.
Think not just about your opening ranges, but your calling range, your 3bet range etc, and think about it from every position on the table. You need to adopt a different strategy in just about every seat on the table. If you have a great opening range that you stick to, but then when it opens before you you're limping every pot hoping to get lucky, you'll be donating money. Pre-flop is about more than just an all purpose opening range. Are my raising/calling/3betting ranges perfect all the time now? Probably not. But I'm much more aware, I've done a lot of reading/study rather than just blindly following (or ignoring) a magic chart, I'm confident tinkering with my own ranges now because I understand what I'm trying to achieve much more often.
I do have a document with my ranges open all the time when I play. I don't need to refer every hand, but if I have any doubt it only takes me a few seconds to check if it is a spot I am not sure of. If I feel I am drifting from my ranges and getting into trouble, or feel myself tilting a bit, I will start checking my range more often. You have to be tough on yourself, if it is out of your range do not play the hand unless there is a very good reason. You don't want to be breaking from your range very often in early or mid position, too much can go wrong ahead of you. In late position you can make a lot more opponent dependent decisions, I'll often open up a bit if players are very tight to steal their blinds or see more flops with speculate hands that might crush their premium openers when I hit the board and get lucky. If there is someone at the table to my left who I feel is weak I might also play more hands because I feel confident that if I connect with the flop I can take their chips.
I've found when I show discipline and stick to my range I am rewarded. When I am reckless, loose and start
gambling with hands I should be folding I am more often than not punished.
A range should be a guide, there are times to break from it that is true, but there is no shame in sticking religiously to a tight range to improve your game and to start feeling like a winner, then building on your ranges from there. If things go wrong then you have a fallback to a position that you know was a winning strategy.
Also, many do advise sticking mostly to one format of play, ie cash or tourney, so playing your opening range (and other standard plays) becomes second nature to you.