Try cleaning the keyboard using the directions in this Apple article:
How to clean the keyboard of your MacBook or MacBook Pro - Apple Support
Make sure to keep the can of compressed air completely upright or you may damage the laptop with the cold wet propellant.
If this does not work, then have Apple or an Apple Authorized Service Provider examine the laptop to provide you with a repair estimate. If the laptop is less than four years old, then it may be covered by this free Apple keyboard repair program, but only Apple or an AASP can confirm if your issue actually qualifies and whether the laptop is less than four years old.
Keyboard Service Program for MacBook, MacBook Air, and MacBook Pro - Apple Support
FYI, here is a current list of the publicly acknowledged free repair programs for various Apple products (some products may have multiple programs available):
Apple Service Programs - Apple Support