I replace my computer keyboard every 3 to 5 years as I do a lot of typing and work from home.
Some people can keep their computer keyboard for 8 to 10 years and sometimes only replace the computer keyboard when they get a new computer.
The more typing you do on your computer keyboard the quicker it will often wear out.
I always just buy the cheap but good computer keyboards for less than $20.00 and they last 3 to 5 years which is good enough for me.
Buying a higher quality computer keyboard can be worth it for some people but cheaper keyboards often work just as well, especially if you don't do a lot of typing.