As another user said, learn and practice methods like STAR or PAR.
More generally, learn a few storytelling methods in the context of coaching and personal branding. Write your own professional career story, then with each iteration make it shorter on the personal introductions, while getting to a few key points that you will throw during the interview when asked for details. Do not write those in the resume, those are your memory aid and cheatsheet to nudge the recruiter if they are interested.
Rambling and going on tangents, and then coming back could be a sign of lack of focus and the ability to stay on topic. If you have ADHD or poor sleep habits, I'd get this in check too. I tend to do this a lot when tired or when I haven't had my morning coffee. It's so bad to the point coworkers tell me "hey, but I asked you Z! Why are you telling me about Y?" And in my mind it makes sense, because I will eventually get to Z by wrapping up the story, but others are neither expecting this nor have patience.
Therefore, practice communicating your ideas more clearly in all contexts, so that when you are caught with your guard down, your muscle memory will at least retrieve a better, more concise answer. Good luck!