The best way to learn is to make mistakes, reflect on them (perhaps with feedback from others), and try, try again.
So... you are up to step 3: Next time you get an opportunity, try to handle it a tiny bit differently. (Maybe the first change you can make is to hit pause before you respond to any texts so that you can think it through?)