Your Magic Keyboard and Magic Mouse each have a built-in rechargeable battery.
Check the battery level. Click the Control Center icon Apple Lithium-ion Batteries.