What keyboard do you have? Have you checked the keyboard connection to your computer? And I want to tell you that if you spilled coffee on the keyboard, then you need to buy a new keyboard. I had this situation.
Before you run to the store and buy a new keyboard and spend a lot of money on it, I recommend that you go through a simple keybordtester on the Ratatype website. Ratatype provides a simple, no-nonsense way to test your keyboard. It allows you to press each key on your keyboard at Ratatype website to see if it is functioning correctly. Each key you press lights up on a virtual keyboard, confirming its functionality. This tool is ideal for checking individual keys if you're experiencing any issues like sticky or unresponsive keys.