Buy your your new gun and relax. The ammo will return, albeit, it might be higher priced than it used to be.
There's a lot of speculation and conjecture as to why the ammo shortage. Even those in the know, don't really know for sure.
I'm quite lucky. I bought ammo years ago, when I had my FFL and I was able to get what I wanted and rock-bottom pricing. Free shipping was included, if you met the minimum required purchase. It was delivered on a pallet and it was stacked about 6' high.
Anyways, the ammo shortage has pretty much run it's course. Now, it's just a matter of time until we start seeing it again, stacked tall and deep on the store shelves.