Nothing you do, you do without a "good" reason! Whether this is really good for you is another question.
Each of us has a reason for doing or not doing something. Usually with the same goal: to ensure your survival (recognition, belonging, security).
If you know your personal motivation, you are in control. Then you have the power (self-power) to determine for yourself what is the best behaviour for you now. Emphasis on self - and this has nothing to do with your ego (learned behaviour). You can give yourself this feeling of inner freedom and autonomy. It's up to you - not your ego - how you want to deal with the situation. How do you find that?
This is the best "ego hacking" to get ahead
1. your reality check
"Do you know with 100% certainty that what you are thinking is true?" No, you think it, but you don't know it. In addition to this personal stopper for automatic (unconscious) behaviour, the "reality check", you need another step so that your self can be in the lead.
2. your cost-benefit check
Use this simple technique to take stock and make a conscious decision for yourself: Your personal "cost-benefit check". You only need two simple questions to find out what "your good reason" for your behaviour is. And above all, what could be a better reason.
Ask yourself:
What do I gain from this (old) behaviour? What do I avoid (= gain) with this behaviour?
What does this (old) behaviour cost me? What do I lose as a result?
Can you or do you (still) want to afford this behaviour?
The great thing about it: as soon as you really know why you are reacting in the way you are, you can weigh up whether it really serves you at that moment. If yes - stick with it! But then there's no more "I could have..., should have..., why didn't I..." afterwards. This de-stresses you and gives you back your own power.
Once you realise this, it will be much easier for you to manage your own behaviour and master your everyday life with more ease.