That is a very good question.
For centerfire ammo - Prior to Al GOre and “Green” primers, I would say, 100 years (proper storage and all that) - I have fired ammo made in 1947, Russian even, and it all went bang... split and seperatd case not withstanding.
Now, with the “Green” primers I would worry after as little as 10 years.
All the ammo I have purchased of late is furrin made/surplus with the old time type primers. In sealed can, in pritine shape - after ammo from open ammo cans were examined from the same lot.
.22 ammo will normally work if it is clean and stored properly.
AR-15
I recommend the Colt LE 6920. High quality materials and manufacturing. Great resale value. The gold-standard in AR-15s. I just bought one here:
https://policeguns.com/catalog/
Where can one find the 'furrin made'? I might as well get the best "bang" for my buck. :)