The following fixes will help you if your keyboard or mouse stops working after restart in Windows 11/10. When this issue occurs, try to disconnect and re-connect your USB keyboard or mouse.
Whether you use Apple's Magic Mouse or a third-party Bluetooth, wireless ... can cause it to stop functioning as intended. The same may occur with third-party mice that work over Bluetooth.