Does the trackpad work during the boot?
Lets check if your trackpad is still working somehow
Create a bootable USB installer https://support.apple.com/en-us/HT201372
Boot from it holding Option. In here you should be able to use the trackpad to select the boot drive, because you're not in macOS yet, it's the Mac firmware. If it doesn't work here, chances are not good.
Continue to boot from USB. You'll get to Recovery Mode.
If you're trackpad doesn't work in RM, something else is wrong, maybe your trackpad is dead.
Run Diagnostics, turn the on and hold D key. See if it brings you any errors.
You can also run it over the internet by holding Option D (firmware password must be disabled)
Here's the references on the error codes
https://support.apple.com/en-us/HT203747
Also, if your Mac is still under warranty, just call Apple Support and then visit a Store or Authorized.
If you do that, backup your personal data, remove iCloud, wipe the disk and let Apple do its thing.