I understand your frustration. This is a frustrating game, even for those on the pro level. Look at McIlroy at the 2011 Masters. Do you think he intended to pull his tee shot on 10 on the last day of the tournament 100 yards offline? Same thing for Jordan Spieth with his tee shot at 13 at Royal Birkdale in the 2017 British Open. Even the best golfers hit miserable shots at times.
Although nerves and their effect on timing can explain some of this, I believe that misapplication of basic fundamentals is as big, if not a bigger explanation. You mention you’ve only been playing for two years so it is likely that some of those fundamentals are not completely ingrained, despite your lessons and practice. And even if you’re fully aware of the need to follow fundamentals, sometimes a flawed concept of them will undermine you.
One of the reasons I’ve always like Hogan’s Five Fundamentals is the basic checklist he sets out through the book. I suspect some of the specifics of his swing are now out of favor–he favored a tucked in right elbow that is the opposite of the current trends–but his description of a proper grip, setup, posture, and weight distribution are all still valuable ideas that any golfer can apply.
Spend the offseason pairing those ideas with the concept that a well-executed golf swing hardly ever leads to a loss of balance–meaning that a loss of balance generally means a flaw in your swing process or setup–and you can go some ways towards finding and starting to fix your problems so that you’ll be more consistent in 2022.