First you need to kick off the starter. Purists don't add yeast, and instead allow the natural yeast in the flour to develop. I was in a rush, and it was my first sour dough, so I didn't try that.
Replenish the starter when you use any (to get the bulk back up to what you need, or once a week regardless to keep the yeast alive. Always replenish the starter with an equal amount of flour and water. And use enough flour and water to replace the quantity of starter you took out for the recipe. My recipes all use 250 grams of starter, and these are the quantities to replenish. I usually make a loaf each weekend, so I replenish the starter then. The starter will survive a couple of weeks without food, as I discovered when going on holiday.