The 7805 needs its input about 2 V above its output, so feed it at least 7 V. Everything above 5 V is burned off as heat:
power = (VIN − 5 V) × current
12 V in, 300 mA out: (12 − 5) × 0.3 = 2.1 W
A TO-220 package without a heatsink manages roughly 1 W before it gets too hot to touch, so at 2.1 W bolt on a heatsink, or use a lower input voltage. For battery-powered projects a buck converter wastes far less.
The power LED draws (5 − 2) ÷ 1 kΩ = 3 mA. The capacitors go close to the regulator's pins: they stop it oscillating, which shows up as an unstable or noisy 5 V.