Make a product so good that people would choose to switch.
I bought a Mac M1 2 years ago. I did some really shitty research when buying it - I didn't have that much money available at the time tbh, even thought at the time they were cheaper in my country (don't ask) than in the US - and went for the lower end of the MacBook Pro. That's a decision I regretted almost immediately, and then end of last year I decided to go for an M3 with better specs.
With this machine, the only thing that is probably going to make me change - besides it breaking down - is probably blazing fast IA capabilities (As in, real-time LlaMA stuff, or similar).
Otherwise I plan to use this machine for as long as I can keep using it. Same applies to my iPhone 13; unless I see a real need for changing it, I'm keeping it - that is if I don't decide to go back to middle tier Samsung phones that in my opinion are better than iPhones.