https://askubuntu.com/questions/962022/macbook-pro...
The newest line of MacBook Pros is poorly supported by Ubuntu (and vice versa). While it is possible to get Ubuntu working, it will take some extra work until Ubuntu catches up with the hardware changes.
To get your builtin trackpad and keyboard working, use a USB keyboard and mouse for the installation (you'll likely run into NVMe SSD issues that you can learn more about here when selecting your partition setup)
When your install is complete, refer to this link to regain control of your builtin hardware.