I recently pulled out my 2018 13" Macbook pro after quitting my job and not having touched this laptop in a while. The keyboard had a couple of issues with repeating keys...and I was out of the warranty period.
Thankfully, Apple has a keyboard service program, and they fixed it for free — in late 2021. No questions asked. With a one year warranty on their fix.
This was just before thanksgiving and it took them just about 3 days to fix from when I dropped it off to when I picked it up, even though it was shipped to a repair center.
That being said, I might not buy a new one for a while because I like having bootcamp to play games and the M1 makes that impossible.