At one point I had made the same realization. Here's how I stopped myself from overtrading and changed my mindset:
I began to limit myself to 3 trades per day. If I hit that limit I was done taking trades, BUT I continued to watch the market for opportunities following that limit. Sometimes I would take 3 crappy trades on subpar setups and then an hour later I would see a great setup but not be allowed to take it. Usually that one trade was the big winner (which I got to watch on the sidelines). For me it was about the changing of my mindset and not about the win! This process lasted long enough for me to get in the habit of only taking the best trades, and now I don't have a limited number of trades but instead follow other rules to prevent substantial losses. By doing this, I made the realization (that most experienced traders say) it's the quality of the trade setup to your strategy that matters vs taking more trades. Sometimes it sets up often and other times not. Just sharing my journey of addressing this problem. Good luck!