Musk firing the majority of Twitter proved that point in spades.
This is a misread of the situation. Musk did what he did because he is a work autist and he mistimed his buyout and was forced to overpay for a shit company. Twitter had been severely mismanaged and had a lot of bloat.
Every big tech company knows they can survive with a very small crew of engineers purely for maintenance. Noone runs a company just to survive, and only private equity firms optimize only for profit. This is true for all companies, only tech companies scale much easier and much cheaper. On the other hand, they can also layoff and cut costs much faster and easier than other industries.
In 2020/2021, low interest rates + government literately giving individuals and businesses cash lead to unprecedented amount of investor cash available for companies. Every executive team had the same meeting where they weighed the outcomes and decided that not hiring to meet the amount of cash available would be infinitely more risky than playing it 'safe' and keeping normal headcount. If they overhire, and things go wrong, they can very easily layoff a lot of their workforce without much cost. If they don't hire, and it turns out to be a permanent shift of money into the tech sector, they'll lose out on so much that it might risk the life of their company. The cost of hiring would go up and they would be late and miss out on top talent who would be going to their competitors. They would have less engineering power than their competitors which limit their ability to make moves and pivot. Which means for example, when chatgpt and ai became popular, google would have had an even worse response, which would tank their stock even further.
I'm sure a lot of the people in these meetings and making these decisions knew the current economic situation wouldn't last. They aren't stupid. However, comparing the worst case scenario of doing a few layoffs, vs becoming an irrelevant company, the choice was clear.
When I was in highschool telling people I wanted to get into software development I had several people warning me away from it, saying things like "my brother he got a degree in computer science and now he can't find a job and he's just working as a janitor." When I started the first few years job searches were hard and options were slim. First place out of school half the staff were laid off the first year I was there.
All these companies that went on bonkers hiring binges always had a bad smell to me.
You shouldn't put too much stock into what outsiders say about the industry. CS degrees don't mean shit. Plenty of people cheat, and plenty of people who can't code, pass classes by making up for it in other areas. If you got a degree and ended up working as a janitor (I've known people who ended up like this) you suck at software engineering.
New grad job search is always going to be hard. Your best bet is to get an internship and get a return offer from it. However internships are mostly offered to the best students in class. Its just a numbers game where you gotta apply and study to pass interviews.