You have some sort of hardware issue with the laptop. If this is a 2017 or earlier MBAir, then the Trackpad Flex Cable and/or the Trackpad itself may be bad/damaged (very common for liquid to damage the connectors on these two items because they are located directly beneath the gap of the Trackpad and Keyboard). Examine the Trackpad Cable and Trackpad Connector for signs of corrosion or scorch marks (trackpad side). Usually if there is any corrosion or scorch marks both parts will need to be replaced.
Regardless of the ultimate source some sensor may not be working or seen, or there may be some power related issue somewhere which will cause the laptop to run at idle speeds of 800MHz even when under full CPU load. The Trackpad does have a temp sensor as does the battery and each of the other internal components. Anything could be causing a power issue even an external device.
I don't recall specifics regarding the 2018+ MBAirs.
You can try running the Apple Diagnostics to see if any hardware issues are detected.
You can have Apple or an Apple Authorized Service Provider examine the laptop.