I agree with others, that computer is pretty much finished, the fan shouldn’t be running full throttle like that either. I myself have a 2015 MacBook Air with a few unresponsive keys, but I plugged in external keyboard and it works fine. ....so, you can try plugging in a USB keyboard, that might work.
However, an upgrade would definitely be the best use of money.
just checked on OWC (Other World Computing), they got a 2017 MacBook Air for $500. They even have a 2013 for $280....but that is practically an antique. Other option is to pick up a cheaper windows laptop from somewhere like walmart and save up for a new Apple Laptop. Sorry for the bad luck.