I work at a major analog IC manufacturer since 1990, and I have seen these kind of supply shortage cycles. These cycles come and they go, like the weather.
From an IC manufacturer's perspective, the problem is that manufacturing a complex IC requires a long lead-time, so product-line managers have to estimate in advance what will be needed. Large customers sign long-term sales agreements to secure their supply during the crunch times, so it's straightforward to plan to support these customers. But a substantial amount of business is small and medium-sized business customers who place "turns" orders to ship in the same fiscal quarter, essentially a demand for immediate shipment. If there's work-in-progress or inventory, that can be used to satisfy "turns" demand. Planning is hard, especially when most of your customers never talk to you except when they want parts immediately.
If there is sustained demand for more parts, then the long-term response is to build more manufacturing capacity. That requires substantial investment and time to bring up a new fab. Usually there are long-term 5-10 year business plans that call for building new and improved fabs, and shutting down obsolete fabs, so at this level the expanded manufacturing capacity eventually breaks the shortages. But the risk is that if the demand wasn't real, then the company loses money on the fab or goes out of business.
Whenever demand exceeds capacity, there are shortages; and "turns" customers tend to respond to shortages by placing multiple orders for the same line item (like ordering LM7805X, LM7805Y, LM7805Z, when the customer only needs any one of those) and then the customer cancels most of these orders as soon as they take delivery of one of those parts. The worse the shortages get, the more the small and medium-sized business customers place multiple panic "turns" orders that will later be cancelled, and the IC manufacturer business managers notice this and start to disregard the "turns" business as unreliable. They'll build more capacity if a big customer makes a long-term commitment in writing, but they won't build more capacity to satisfy orders that they expect will be cancelled.
I can always tell when we are in a global supply shortage storm when I start to get a lot of customer support calls asking for exact replacements of our own products, of the form, "do you have a second source for (your company's) XYZ123". Our company doesn't re-design an existing product and release it with a different part number, that doesn't make sense; but desperate customers dream that somewhere there's a box of XYZ123a that are just as good and nobody else has thought to use those. Sometimes though there may be multiple grades of similar product, with differences in temperature range, accuracy, maximum speed, or supported features, sometimes even in the same package style; so it's not a complete nonsense inquiry -- reading the datasheets and product selector guides, together with an understanding of the actual customer requirements, can often find possible alternative parts.
Another force that contributes to the problem is that financial analysts (wall street) strongly dislike excess inventory. The popular Just-In-Time logistics planning used in the automotive industry and other businesses, comes from this financial incentive to aggressively minimize local inventory. The idea of Just-In-Time is that the delivery truck arrives at the receiving dock with more supplies just as the local parts supply runs out. When it works, it lets a customer factory work efficiently with most of the floor space dedicated to assembly and testing, and very little floor space dedicated to storing parts and supplies. However the risk of Just-In-Time is that any disruption in the supply chain directly impacts the factory operation.
Counterfeit products such as engineering samples, old revisions, failed test reject units, and even unrelated parts with similar packaging, are easily re-inked with whatever top markings will sell this junk to the most desperate customers, who don't have the time or energy to fight a $25 or $50 loss, and it's easy enough for these fly-by-night cheaters to create a new account if they start getting bad reviews. There is even a scam called "brushing" where a dishonest auction vendor creates fake reviews to give the appearance of being a trustworthy source. There's an old saying that if a deal seems to good to be true, it is; and in times of global parts shortages, the "too good to be true" element is that the parts are available. Buying from these type of auction sites instead of authorized distributors is gambling that you're not being sold a bag of sand.
So for a small or medium-sized business customer, the problem is how to defend yourself against these supply chain troubles, where the parts you want are "on allocation", none of the authorized distributors can supply you any parts except with 26-week lead-time, and the only place you can find what you need is on the gray market...
The first step is to recognize that there is a "storm" of high demand currently squeezing the supply chain, so you cannot simply buy whatever you need just-in-time, at least not until the supply chain recovers and becomes more stable.
If you're a small business and you know you need to build 1000 pieces, then you have to find 1000 or more pieces of something you could use, and get those parts in-hand. If you can't get the parts, you can't build product. For a hobbyist, that could mean delaying a project; for a very small business, it might make sense to go into hiatus until things clear up. At any rate, in such times you have to deal with the supply chain issue hand-in-hand with product design. You can't ship what you can't build.
Relationships are important at times like these. If you are trying to get microcontroller XYZ and the datasheet lists 12 different ordering numbers, examine the ordering information table in the datasheet, and determine which exact part numbers you might be able to use. Maybe some of the parts have insufficient memory or speed or voltage or package size. But maybe there are 5 different ordering numbers that would all be usable in your application. Contact a person at an authorized distributor, either chat or DM or voice phone call. For example, "Can you help me find 1000 pieces of microcontroller XYZ, I can use any of these 5 ordering numbers" -- maybe you can even accept mixed lots or partial reels, 300 of XYZa in 3 weeks, 500 of XYZb in 7 weeks, and 200 of XYZd in 2 weeks. These are challenging times for the distributors too, so if you can offer them some flexibility about what parts you can accept and when you can take delivery, they may be able to negotiate something.
Contract Manufacturers (CM) are another possible resource for helping with supply chain issues: there are many companies that encompass both PCB fabrication and assembly. Customers can send the PCB layout files and bill of materials, and the contract manufacturer fabricates the PCB, sources the components, and assembles the boards. Often the CM can even perform some level of testing. They may have an internal inventory of "partial reels" of commonly used components like 0.1uF capacitors. They might also have relationships with distributors and manufacturers. Call a CM salesperson and ask for a quote, they may be able to work something out. CM assembly quotes tend to be a premium price, but they do encompass a larger scope of work that just providing blank boards.
At some point the microcontroller might become so much of an uncertain element due to supply chain issues, that it makes sense to design to support multiple alternative hardware options. Ordering blank PCBs is not too expensive, so if you design one version of your product's PCB that is based on ARM and another version of your PCB based on PIC and another based on STM32, with the same mounting holes and same connectors, then you have even greater flexibility against supply chain problems. The cost is that now your firmware has to support more than one target, and that gets complicated. If your firmware is written in C or some similar high-level language, there's a good chance you can make your firmware portable between the different microcontrollers. If you really don't know from week to week which microcontroller you can buy, then writing portable firmware and supporting multiple PCB options becomes worthwhile. Sometimes PC motherboards can be seen that are shipped with "empty" locations, because the successful motherboard vendors already use this technique to defend themselves against supply-chain disruption.