For Intel based, this one is the best bang for the buck:
Intel Laptop
For AMD based, this is the best bang for the buck:
AMD Laptop
Cheaper than a laptop, but 2x faster: (recommended processor count and memory is upgradable to 64gb)
Mini PC faster
Cheaper than Laptop, around the same speed:
Mini PC slower
What should I choose?
My next step after making my multi-platform MVD will be investment, so at that stage I can get a system with all the bells and whistles, but right now, I am bootstrapping the project so I want to save money but not get stuck with a system which compiles too slow.
Modern HP is on my "do not buy" list. Certainly if you plan to use it for more than a year or two.
You've said the main job is compiling, presumably software large enough that we're not talking 0.1 seconds vs 1 second for a new vs old laptop, but 5 minutes vs an hour or something like that.
For compiling with a well set-up build system, the more cores the better. The AMD HP laptop you point to has only 8 cores.
Both HP laptops you point to look very thin. They are going to have crap cooling and the CPU is going to throttle like hell within 15-30 seconds under serious load.
The Lenovo models I've pointed you to have a lot of cores (my i9-13900HX has 24 cores) and good cooling (for a laptop) and even long all-core compile tasks only throttle back from initially around 4 GHz on all cores to maybe 3.2 GHz. That's a Legion Pro 5. The 7 and 9 series apparently have even better cooling, with e.g. the case being metal instead of plastic, bigger internal heatsinks etc.
A mini-PC will have better cooling than a "thin and light" laptop. A large desktop PC even better cooling.
In 2019 I had my personally-owned i7-8650U NUC mini-PC with 32 GB RAM, which had travelled the world with me for a couple of years, using whatever monitors I could find in the offices I visited. Then my employer gave me a company ThinkPad X1 Carbon "thin and light" which is "widely considered the ultimate road warrior laptop" with the same i7-8650U CPU.
The laptop took literally twice as long to compile the GNU toolchain (binutils, gcc, libc) as the NUC, it throttled so much. We're talking an hour vs 30 minutes kind of twice as long. Since I'd stopped travelling that's when I built the 32 core Threadripper tower (20+ kg) which did the same task in 5 minutes. And now I have the Lenovo Legion Pro 24 core i9 "gaming" laptop which is faster than the Threadripper even on long intensive tasks but I can travel with it.