I went to graduate school in a STEM field, intending on finding an academic job afterwards, with industry as a backup. I knew it was competitive, but nobody told me exactly how competitive it is. I noped out after I realized I was entering a field where I would literally have to wait for someone to die before getting a job, and some of the professors at my school had graduated 10+ PhD students already.
I considered myself maybe a 60th percentile researcher, which I knew wouldn't be good enough. It's a good thing I opted out when I did. I know people who were as good or better than me who are keeping it together with a string of visiting positions, still hoping for that tenure track line to open up. I expect most of them will be giving up on academia in the next 2 or 3 years.