I second the Mac recommendation. I use Linux on my desktop, but use Mac for laptop, after 6 years of using MBP (I still use my mid-2015 15" MBP for mobile development and day to day work), I can vouch for their quality (but skip the 2017, 2018, butterfly keyboard + touchbar crap, our company have buttload of those broken). Their M1/M2 battery life is just out of this world.
If OP worry about spending big and having buyers remorse, I recommend MBP.
But not expected, and they may have selfhosted repo at home.