I'll give this a shot
How much money are you willing to lose in a single session? It should be an amount that you can easily shrug off if you do lose it. That amount varies from person to person.The reason to do this is because it must not affect your life or future poker sessions when you do lose. And you can lose quite a few times in a row...
Basically put , you should play with a portion of your bankroll that you can afford losing a few times in a row. One tenth? One twentieth? I personally play cash games with only 1/50 of my bankroll. I'd recommend the smallest portion possible until you get more experience and know you are a winning player ( this can take awhile). Play at stakes where you don't care to lose a couple of BIs but are happy when you win some.
Ex : I have 1K bankroll to play cash games and am willing to lose 1/50 , wich represents 20$ (Always buy-in for the max amount) , therefore I will play at theses 20$ cash game stakes until I build my total bankroll up to 50x the next lvl ( if next lvl is 30$ max buy-in I'll need 1.5K). If you lose money right off the bat , you'll have to drop down in stakes accordingly.
Last advice would be to study the game more than you play it for now.
Good luck!