This is good advice, OP. The most valuable thing in life is not money but time. Time to spend with a a partner, spouse, family, friends, or a pet. Time to travel, to (finally!) learn Haskell, to read everything by Alastair Reynolds has written. Time to achieve your fitness goals. Time to make art or music.
Buying things is fun, but you can’t ever buy more time. We’re lucky as SWEs that we have better salary prospects than most. If you learn to invest that money and do so aggressively from your early twenties, it’s possible to have much more time and freedom by the time you reach your 30s. Checkout r/Fire for how to do that, but basically just think about what options you want to have available to you over the next few decades. Making these decisions NOW and sticking to them can really change the course of your life and give you back time for whatever it is that’s ultimately most meaningful to you.