The shortage was due to demand from people beyond mining wanting GPUs (including a new problem... scalpers) and there not being enough production. In effect, it was a manufactured shortage. There are a ton of articles that talk about all the aspects that went into the shortage and miners are definitely not the only reason. Easy scapegoat though...
https://www.pcmag.com/news/inside-the-gpu-shortage-why-you-s...
https://gamerant.com/nvidia-gpu-shortage-not-due-crypto-mini...
https://www.pcgamer.com/why-crypto-mining-wasnt-the-only-cul...