First you gotta decide on a budget.
Then from there, decide on how many to invite. Because how many you invite, directly affects the cost of the food/cake size/goody bags amount etc.
Then from there, decide on where and when.
If having a party at a meal time, then you gotta also pay for lunch, for them and the food. Versus, if it is at a non-meal time, then you just provide cake/ice cream, drinks etc.
Per our kids' parties, we only invite their friends. Not an entire class. Even my kids have no desire to invite an entire class. Just their friends.
Under 8 kids.
We also discuss with them about "budget." They fully understand.
My son turned 6 recently, and we had a budget, he invited 5 friends (his closest buddies), he wanted a Pinata, a scavenger hunt, we had racing type games, egg on a spoon games, a "guess how many are in the jar" games and the winner gets to keep the jar, we held the party at a nearby park, thus no fees for that, we had a cake and food which I got from a nearby place that was good and affordable, the boys had TONS of fun! Because it was at a park and boys LOVE to run around. We even took them hiking because the park is a hiking type park with tables, and we brought my son's bike there too, which all the boys had fun riding! And they also just played make-believe with their own made up games, collected sticks and stones and chased each other around.
It was all a ton of fun for them, nothing had to be rented or paid a fee for, and they all had a blast! My son was super happy and the boys all talked about it for days!