"Learn to Code" was never a good suggestion. I've met so so so many people who are late-stage career changers (people in their 40s or later) who were laid off and told to learn React and get a job doing that. I've seen construction workers, truckers, retail workers, people with business degrees, stay-at-home moms, grocery store butchers, and other people who have no experience or interest working in technology who think they can just force themselves to care enough about the field to learn the requisite skills to get a job. I've seen this work
occasionally but the majority of people who go through job retraining facilities end up with useless certificates and no job.
But telling tens of millions of Americans to force themselves to learn a skillset they hate so that 1% of them can get a white collar job is a terrible way to build an economy. Schools try to teach kids to code in kindergarten now on the off chance that the top 10% of performers will end up in STEM, and then the other 90% just have... a useless set of a skills and have to figure something out for themselves when they turn 18.