If it were my Macbook, I would replace the keyboard … but BE VERY CAREFUL with the connector port that the keyboard cable plugs into … they usually have a tiny plastic “blade” that you flip up to release the tension off the cable so you can pull it out … that little door blade is very fragile … i broke mine once and was forever on an external keyboard until one day i had to replace the motherboard and got a new connector (obviously) ….
Look for video on how to replace the keyboard or the ifixit pics … know the process before you remove the first screw.