I think that you should first figure out the current requirements of your device and then choose the batteries selectively.
To do this you have to get the Operating current and voltage data of the element you want to drive from the datasheet(Here Servo Model-SG-5010).
I found some data here:
protosupplies.com/product/servo-motor-sg-5010
From this, We can say current required to start your servo motor should be around:
600mA @ 5V-DC
Now you can easily calculate Max. power required to drive your servo by using the formula:
$$P_{req} = V * I$$
Which calculates to:
$$P_{req} = 5 * 0.6 = 3\ Watts$$
This is the estimated required power and does not include any efficiency losses.
Well, In most cases you are not directly powering your circuit through the battery, you generally use some voltage regulator in between to scale the voltage down to a nominal level, these circuit elements consume some power to operate and hence there is some decrease in efficiency, so the required power is generally greater than the estimated power and can be calculated as:
$$P_{final} = \frac{P_{req}}{\eta}$$
Where eta is the conversion efficiency of the voltage regulator you are using. Let's say it is 80% efficient, so the value of eta would be:
$$\eta = 0.8$$
Now, calculating the final required power.
$$P_{final} = \frac{3}{0.8} = 3.75\ Watts$$
This is the actual required power that your 9V battery should be able to deliver to drive your servo.
Next, calculating the required current @ 9V-DC & 5V-DC (Critical Battery Voltage below which operation will halt)
$$P_{batt} = V_{batt} * I_{batt}$$
$$I_{batt} =\frac{3.75\ Watts}{9\ V}$$
$$I_{batt} \approx 416mA\ @\ 9V$$
So, your battery must be able to deliver at least 416mA @ 9V-DC or 750mA @ 5V-DC to drive your servo properly.
Now there are two questions:
- Whether your 9V battery can supply that kind of current or not. If it can then you are pretty much assured that your motor would run smoothly, otherwise, there is a chance of failure.
- If the above condition is met, how long will it run? (I will be skipping this part, It depends on the battery capacity and other factors.)
To answer Question 1, My approach is to calculate the maximum allowable internal resistance of the battery, given your requirements. As it will give you a more clear idea which battery to choose.
To calculate max allowable internal resistance of the 9v battery for your application, first, find the critical battery voltage at which the normal operation will halt (5V in our case) and the current o/p required in that state to continue normal operation(750mA in our case).
Next, we need to calculate the max allowable voltage drop across the internal resistor:
$$V_{Drop} = Nominal\ battery\ voltage - Critical\ voltage$$
$$R_{internal} \leqslant \frac{V_{Drop}}{I_{Critical}}$$
$$R_{internal} \leqslant \frac{4\ Volts}{0.75 Amps} = 5.34\ \Omega$$
From the above result, we can say that any 9V battery(or combination of cells) with internal resistance less than 5.34 Ohms will work for your application (The Lower The Better).
Possible solutions are rounded off in the below table, those which are out of the circle cannot be used until or unless they are paralleled in sufficient quantities to lower their resistance.

Source: learningaboutelectronics.com
(Needless to say, this is the very basic answer to this question, in reality, there are many more parameters you have to look at.)