I disagree with your premise of “we can’t always get what we want.”
We can always get the one reasonable thing that we want. Of course it has to be reasonable, such as we probably can’t meet King Tut, that’s impossible. Perhaps we can’t win the hundred meter sprint at the Olympics, that takes genetics and years of work.
If we set reasonable goals, contributing reasonable efforts to achieve “that one thing”, we can get pretty close. Close enough to declare victory.
For instance if you wanted to be the president of the United States, that’s not really a reasonable goal. A reasonable goal would be “I want to be a leader.” If you set your goal to this statement, and worked just about every day, sought out mentors and shared your goal with them, sought out their advice, sorted out the good advice from the not so good, acted on what you thought was the best advice, you’d get pretty close to your target. Of course you would have to make a lot of sacrifices to achieve pretty close to your target. You’d probably have to start fairly young, be involved in school politics, go to the city council meetings, meet the local politicians, volunteer in their campaigns, learn from them, have only outside hobbies and interests that forward your goals, make your goals the center of your social life, set short term step goals which further the main goal (right university, right degree), a commission as an officer in the US military, preferably have a military career associated with the state department, still active in congressional politics, active in the political party, maybe have one of the “plum jobs.” . . . you’ve pretty much gotten where you wanted to be. Of course you probably didn’t have much time for your family, you’ve probably neglected to woo a spouse, or neglected the first, second, and third . . . you know the ones you married for the right political connections. You’ve probably neglected your health, and intellectual pursuits which could have given your life more meaning. But you’d have that one thing . . . and likely little else.
Instead if you’ve focused on happiness, avoid dramatic and toxic people, love people not things, marry a like minded person, focus on family, have children . Aim for a reasonable career that pays well enough, have reasonable pursuits, a house good enough not certainly not beyond your means, work close enough to where you’d like to live, not too far from family, have enough time off, take care of your health and your family, do reasonable healthy things with reasonable healthy people, you’ve got a good shot at being reasonably healthy happy life . . . goal achieved.