You've got an answer on how to find out the keys causing problems, now for the solution:
Good hard cleaning!
(If not under warranty, opening warrantied notebook might void the warranty)
If the notebook is still under warranty and you don't want to loose it you might want to send it to authorized service after backing up the data and removing any compromising and sensitive materials
I have seen similar problems with laptops used by people who eat while using them (fries are surprisingly sticky and the oil congeals after some time) or when a lemonade or other fizzy soft drink spilled into the notebooks.
I'm only using eating as an example, the same effect can be achieved with dusty environments (main cause) or storage (your bag might contain more lint and dust than you think) and that combined with water condensing in your electronics when rapidly transferring indoors-outdors can help to get contacts "stuck". So, proper cleanup of the insides is my recommendation once every few years...
It's not the end of the world and unless the keyboard is backlit - and probably even then - the cleaning should be possible and not that hard.
If your laptop is even remotely current (15 years or younger), there ought to exist a youtube disassembly video. Use it with a liberal application of vacuum or canned gas or compressor to clean up the dust and take out the keyboard desk, which you can then clean up with detergents and water and let properly dry up. You can even take out the keys if you're careful and adventurous, but a detergent and a painting brush to get under the keys from the side was usually sufficient for me.
Be careful of some laptops, which may require removing the cooling circuit from the processor/graphics, you're going to need to clean the old paste with alcohol and buy a new one and apply a dollop, but generally, it shan't be needed. If you watch the video, you should find out from that.
P.S.: and check if you don't have an old wireless/Bluetooth keyboard/mouse still connected. I once tried to diagnose this precise problem, where every time I was at home this happened and only found out when I was at my wit's end readying for disassembly I had a dongle from an old wireless keyboard lying under papers pressing some keys in my drawer connected to the notebook. :)
P.P.S.: any kind soul wanting to format the answer better, add more details or warn on using a vacuum to clean electronics (15 years and counting without a hitch) is welcome, I'm writing from my phone and it's a nightmare. I'm making it community wiki.