Unfortunately, in life, there are no guarantees that one would necessarily get it right.
It's about trying your best, learning, developing self-awareness, seeing/reading the signs and choosing accordingly... an picking yourself up when you fall. It's hard. We don't always get it right.