A lot of people use the word "bankroll" without actually understanding, what it is. A bankroll is an amount of money, which will protect a winning player from going broke due to simple variance, or at least make it very unlikely.
This is mainly important for professional players, because if poker is your only source of income, its obviously a disaster to not have money, because then you can not play. So its like being an Uber driver and crash your car without insurance. Now you have no car, and you also have no job, which is even worse.
So first of all not everyone needs a bankroll. If you play poker for fun, and stay at low buyins, it should not be a problem to make another deposit from your salary now and then if needed. And second its not possible to have a bankroll, unless you are a winning player. You have no track record to prove you are a winning player, so you need to assume, you are probably not.
The answer therefore is, that cash games are great for practicing, so that you can perhaps become a winning player, but you need to set some money aside for that. You can deposit 50$ or 100$ and then start grinding away at 2NL, while also studying and improving your game. And then just see, how it goes.