Your move hands the opponent a tactic that a single prophylactic move would have erased.
Your move was fine on its own — but it opened the door to the opponent’s tactic: a fork, a pin, a check that wins. A move isn’t finished until you’ve seen his reply. After you choose, switch sides: “what forcing answer does this hand him?” If it gives a check or a capture that wins material, find another move.
The good news: it is a pattern, not bad luck — and patterns can be trained. Step one is measuring yours: how often it appears in your real games and how many rating points it drains. Then the daily repair: 5 minutes on your own positions, not invented puzzles.