Hi Woodstock,
Your "ordinary" 7805CV regulators are guaranteed to have an output from 4.75V to 5.25V that is regulated, when their input voltage is 8V or higher. They can supply 1A or more of output current. They have a fairly high operating current. They are in a monster TO-220 case.
For your project that is powered by a little 9V battery, you need a low-dropout regulator that continues to work as the battery voltage drops over its life. You don't need 1A output with its high operating current. You don't need a wide 1/2V tolerance. You don't need the big case.
The voltage of a little 9 alkaline battery quickly drops to 7.2V then drops slower to 6V over its life. See my graph.
The LM2931AZ 5.0 is guaranteed to have an output from 4.81V to 5.19V that is regulated, when its input voltage is only 6V. Typically it operates well when its input voltage is only about 5.3V. Its max output current is limited to 100mA. It has a low operating current. It is in a small TO-92 case like a BC547 or 2N3904 small transistor. It is perfect for circuits powered by a 9V battery and all semiconductor manufacturers make low-dropout 5V regulators like this.
Low dropout regulators must have a pretty big output capacitor. The LM2931 needs at least 22uF but I use 100uF to be safe. :lol: