How can I fix my iPad Magic Keyboard when everything works except the trackpad?
Apparently you are not alone. It appears to be a widely experienced issue. Here's an extended discussion on the MacRumors forums:

https://forums.macrumors.com/threads/magic-keyboard-trackpad-stopped-working.2233242/

Going through the discussion you'd see that there's no uniform approach that has resolved the issue. A variety of things have worked from cleaning the connectors, hard and soft restarting the iPad, reinstalling the iPadOS etc. People appear to have experienced the issue with iPadOS 13.4.1 as well, so it could very well not just be a software issue.
It's not clear from the discussions if it's a hardware bug or a software bug. Also, the folks at Apple Support are apparently unprepared too with responses like &quot;never heard before&quot;.
I guess contacting Apple support may still be a good idea, hoping they have heard enough to call for an investigation and come up with an appropriate.