Experienced traders learn from the lessons of the past and develop specific trading rules to avoid making the same mistakes twice. They stick to their rules, no matter how much temptation there is to violate them. Everyone has a different list - here are some of mine, which I keep posted next to my screen to make sure that I check them before entering a trade.
When I finish a trade, whether in profit or at a loss, I have a rule that I steadfastly stick to. I close the chart and do not look at it for 24 hours. This prevents me from revenge trading. There’s a reason the trade was closed, which means there’s likely no reason to immediately re-enter.