Sadly, I’m also suspecting liquid damage here as well. While you may have not realized it! COVID did in a number of systems as people would wipe the gear down with wet naps, in doing so some of the liquid would drip into the seams of the trackpad and behind the keys damaging the circuits.
If you review the [guide|150646] looking at the trackpad and keyboard connection’s (Steps 10 onwards to 12 and the to Steps 42 to 44) the connections are not likely to get wet from the bottom.
This will require a new upper case (Apple doesn’t offer the keyboard alone, and a new trackpad. Review the Apple [https://support.apple.com/self-service-repair|Apple Self Repair site] for Apples manual to get the parts you will require.