You can monitor the battery remaining on your Apple Bluetooth keyboard and Magic mouse 2 via the Bluetooth icon in your menu bar control center > Bluetooth > or by visiting System Preferences > Bluetooth and selecting Show Bluetooth in menu bar. When you click on the Bluetooth symbol there, a panel will appear showing the battery level of the Apple devices.
You can connect the Apple Bluetooth keyboard charging cable to the USB-A port on the Mac, and continue to use the keyboard while it charges. This is how I use my Magic (extended) keyboard with my M1 mini.
I haven't charged that keyboard in over two weeks, and the mouse was charged last night with heavy usage today. The Apple Magic mouse can recharge in less time than it takes to watch a movie.