One of the most important things to do after a bad shot is to reset the brain that way you can approach the next one fresh. I think it’s natural and human nature to spend the entire walk/drive to the next shot thinking about that bad shot and what went wrong. If you’re not doing that, then you might be jumping right into the next shot, planning it out and visualizing the recovery. While that’s not necessarily bad, I think it is missing a step to get yourself into the right mindset to make that next shot happen. This is a walking exercise, but probably can be applied to being in the cart as well (just make sure to keep your eyes on the cart path!)
Once you have a line on your ball, start walking towards it, but don’t focus your vision directly on it. Pick a spot above your natural eyeline, forcing you to look slightly up and keeping your chin off your chest. This spot can be something like a tree top or the point above the flag stick, but really anything works. Keep your eyes on that spot, just with a soft focus. If you notice your vision wandering that’s okay, just acknowledge it and put your vision back on that spot. As you walk, actively feel the pressure in your feet, naming where you feel the connection to the ground and how it changes as you move. Follow that movement up your legs and through your core including how your arms are moving or how the pressure against the pushcart feels if you’re using one of those. Next, actively listen to the world around you, naming everything you hear (carts, shots, angry cursing golfers who hopefully aren’t you). Keep your vision on your spot as you listen, but just acknowledge the sounds.
Finally, once you get to your ball, stop and close your eyes. Take a deep breath in through the nose, out through the mouth, open your eyes and now plan the shot.
Exercises like these can hopefully keep emotions and frustrations from compounding on each other out on the golf course, leaving one bad shot just being one bad shot. Try it out!