When you set a toilet in place, if it has a bit of a rock to it, no amount of tightening the bolts will stabilize it.
First, make sure it really is in place and you’ve mashed down the wax ring so that the toilet is fully on the floor. If it continues to rock, you probably have tile that is a bit uneven or some other anomaly with your floor. Here’s what you do. Go raid your kid’s piggy bank and get some pennies. Use the pennies as shims around the edge of the toilet to stabilize it, making sure the weight is distributed across several pennies.
When you caulk around the bottom of the toilet at the end of the job, it will both hide the pennies and ensure they stay in place. Assuming you use white caulk instead of clear. Which you should, for this very reason.