Hello maiconapple,
Thanks for dropping by the Apple Support Communities to get help with your Mac.
If you are using a wireless mouse and keyboard, they connect to your Mac using Bluetooth. So, if Bluetooth is not working on your Mac, it won't be able to connect with your peripherals. Since we know something is going on with your Bluetooth functionality, it's likely that's why your keyboard and mouse don't work and we'd want to focus our troubleshooting there.
To start, follow the steps below which will help us begin isolating:
- Restart your Mac: Shut down or restart your Mac - Apple Support
- Make sure you're running the most updated version of macOS for your computer: Update macOS on Mac - Apple Support
- See if the issue continues in safe mode: Use safe mode on your Mac - Apple Support
- See if the issue continues in a new user: New user or group setup on Mac - Apple Support
Should you need more help after that, we suggest getting in touch with Apple Support directly. They will have the tools and resources needed to further investigate the issue. You can do that here: Get Support.
Have a wonderful weekend.