4e no idea.
5e caps normally at 20 for PCs, with a few exceptions allowing to go over that.
4E used exclusively level-based stat increases; you got +1 to any two stats at levels 4, 8, 14, 18, 24 and 28 and +1 to all stats at levels 11 and 21. A couple of epic destinies also gave you +2 to any two stats (effectively +1 to rolls related to that stat) in lieu of other features.
Magic items did not increase stats at all (ex. Gauntlets of Ogre Power increased your lifting capacity and allowed you to throw 20+ lb. objects as weapon attacks, but did not affect your Strength score).
Another important note about 5e's stats is that, unless you're using feats (they are optional and I know at least a few groups who don't use them) you're pretty much going to get your class' key stat and probably some others to 20 eventually since, without feats to spend them on instead every class gets at least +10 to their stats over the course of leveling up and some, like the fighter (+14) and rogue (+12), getting even more than that.
If you had a 16 to start in your class' primary stat, you'd be able to get it to 20 by level 8 on most classes and level 6 on a fighter.
As such, ironically, 5e almost goes back to the "stats don't matter that much" since everyone will eventually cap their main stat. The only difference is what level they cap it and how many other stats they're able to improve in addition to their main one.