I make dumb mistakes when I am time trouble how do I stop that?

Basically, there are two options.
1. Stop getting into time trouble. Learn some openings, so that you can play the early game phase fast. Learning theoretical endgames and endgame principles very well also helps, as it allows you to play the endgame phase fast and decently accurate.
On a more general note, learning principles on different phases of the game is itself a time management skill; you create heuristics for your brain to shortcut to good moves without the need to calculate everything.
2. Keep getting into time trouble. You will eventually develop nerves and make less mistakes. Unfortunately, you can never eliminate mistakes in time trouble, because that's how time trouble works.
Also, be prepared to make mistakes in time trouble. Unless, of course, you'd rather lose the game but play good moves.
Here is a 3 minute game where both sides got into time trouble:
"I make dumb mistakes when I am time trouble how do I stop that?"
++ TimeControl "900+10", so you have 10 seconds per move, that is no time trouble.
Do you make mistakes because you do not have enough time to find good moves,
or because you get nervous and frightened to lose on time?

When you're in time trouble, focus on making the most essential moves to maintain the integrity of your position and address immediate threats.
"I make dumb mistakes when I am time trouble how do I stop that?"
++ TimeControl "900+10", so you have 10 seconds per move, that is no time trouble.
Do you make mistakes because you do not have enough time to find good moves,
or because you get nervous and frightened to lose on time?
2nd one I get frightned whenever I am Under 2 mins