If it beeps on startup instead of booting, then you have a dying logic board that is common on these old 2011 MBAs. In that case, there is not a lot you can do, besides disassemble it and sell it for parts.
Otherwise these laptops usually benefit from complete system format and reinstall and thermal paste cleanup / reapplication. Other than that, worn out batteries may cause it to slow down to prevent unexpected shutdowns if used on battery, and once or twice the cause for a very slow machine was a dying SSD. Trackpad button can be cleaned, but it is a nuisance and I don’t think there is any guide showing how to do it.