The following will require any USB keyboard and mouse. If you don’t have them, borrow or buy them, they are inexpensive!
1. Connect the USB keyboard and mouse to the computer.
2. Open System Preferences – Bluetooth
3. Un-pair the wireless keyboard and mouse.
4. Turn off Bluetooth
5. Restart the computer in Safe Mode per the directions in How to use safe mode on your Mac - Apple Support
6. Restart the computer normally.
7. Open System Preferences – Bluetooth
8. Turn on Bluetooth
9. Re-Pair the wireless keyboard and mouse.
10. Unplug the USB keyboard and mouse and begin testing the wireless devices again.