"Find games you can beat and play them a ton".
I'll start with repeating this Johnatan Little" quote, because I am truly convinced it is crucial.
So, following this advice, my recipe for building a bankroll would be to find the stakes you beat. Let's say, for
online poker (most probably 80-90% of poker players are online players these days) it would be 2NL. Play it a lot, note how much are you able to earn. If it goes very well, try out higher stakes, let's say 5NL. Play for some time and compare if your profits are higher than at 2NL. If they are, keep grinding and try to go higher after some time. If they are not, go back to 2NL and work on improving your game.
In my opinion, to do the above, amateur players do not need any specific target-numbers like 30 buins or whatever. Of course, you need to track and measure your results, you can set yourself some kind of target, but let's be serious - as long as your main source of income is not poker it does not really matter if you deposit $200 or $20 to play micros. If you loose your $20 you can always deposit next $20. Just keep it under control.
If you still struggle to beat NL2, I'd recomend not to go higher and keep learning while minimising your loses. You can also play freerolls to learn and improve your game for free.