Acknowledge what came to your mind when you read the title. You are not alone to feel this way. All of us do at some point. And, people like me don't learn and feel this way multiple times in life.
The thing that I learned from the recurring feeling of "I wish I had seen it coming" or "The signs were there but I just couldn't make sense of it. I wish I had" is that it will only make sense in hindsight.
I stopped beating myself up for not knowing earlier because it never makes sense earlier. It always, as a rule, only makes sense after the deed is done. You come up with ifs, buts and how could theys. Run multiple alternate scenarios in your mind trying to save yourself the guilt, anger, sadness, and agony that you may feel.
But know that none of that is going o help. None of the make-belief scenarios are going to change what has already happened. That's the thing about time, once gone it will never come back again. So matter how many smart reactions, or alternatives of an incident you come up with, it won't help.
The thing that will help although is to understand in hindsight what just happened, and everything that built up to that. Understand and analyze. Learn from it, but don't spend too much time thinking about it. Some time is always necessary to invest. So when something happens, acknowledge it.
It's okay to get mad at it, denial never helped anyone. If you find yourself thinking about it, try not to shove the thought away. Instead, let it pass without building a story about it. Then, learn from it. What happened, why it happened, without thinking of alternate scenarios as you clearly won't get a second chance at the same situation. It's already happened.
Learn from your past to build a better future, not to try and alter your past for that is never an option. I know it's not easy. Nothing ever is. Learning to walk too wasn't easy. But we did manage to do that anyway. We didn't let anyone stop us from getting back up again every time we fell. We still tried. We didn't let people holding us down, not letting us stand, just for fun, register as a traumatic memory.
We moved on without giving anyone even one thought, forget about days of alternate scenario thinking. Reconnect with that daring child. learn not to give second thoughts to things for no reason. It won't help. Time once passed doesn't come back. So voluntarily choose to acknowledge, learn, and move on. Choosing to move on is the key.