Computer: Generally, every 2 years, timed with the release of the latest GPU tech
Consoles: Whenever a new one is released.
Phone: When I was on Android I updated pretty much every year because of decent trade-in incentives when I bought my phone directly from Google. Since switching to Apple, I've been upgrading every two years because they seem to make somewhat major changes to their phones on that same cycle. Currently have a iPhone 16 Pro Max and see absolutely no reason to upgrade to a 17.
Everything else: Whenever I feel like it