Whatever amount you can comfortably afford to buy without going into the poor house, the last thing you want to do is buy ammo (or anything else) if its going to affect you or your family's ability to pay bills, or affect you or your family financially in a negative manner, no one is going to have the same "comfort" level. Myself personally, I don't buy during a panic, I buy when its either on sale or a reasonable price, same with magazines. I buy for economic reasons, ie price increases due to import bans or panic buying, this way I don't have to worry about paying astronomical prices or none being available for an extended period of time.
There are a several ways that can help mitigate the cost of ammo and magazines.
1) If you have friends who consume the same caliber who are local that you shoot with, you can split the cost then divvy up the ammo accordingly.
2) Have a friend(s) buy it when its on sale if you cannot afford to buy it at the time and then repay them when you get the money, I would suggest only do this if you can afford to pay them back in a reasonable amount of time.
3) Set change aside at the end of each day, you'd be surprised how quickly it adds up, then buy ammo when you have enough to buy it.
4) Set $10 a week aside, in a years time you'd have $520 or in six months you have $260, or whatever amount of money you can set aside along with the change, you could buy a sizable amount of ammo over 12 months time.