macOS Catalina - Keyboard and Trackpad not working
It seems that your issue is not with the MacOS itself but rather due to the hardware controller inside your computer. In such cases, you should reset the System Management Controller (SMC) by following the steps below:

Turn off your computer
Press and hold Shift + Control + Option (Alt) + Power Button for 10 seconds
Release the keys and let the MacOS boot up