I used to say 2/3 of what you are buying is what you are standing on not standing in. Now I’d say 70-80% is the land value depending upon the property
As for the specific question you asked there is a lot of nuance involved and no simple answers. Having done this a couple decades I can look at two houses and comps and put a number on what I think any given house is worth above or below average market value at the time but that comes with experience. Generally I advocate buying the best lot/location you can get because that can’t be changed and it’s where most of the value is. Plus you’ll stay longer and enjoy more a property on a good lot in a good location
I think all four matter and if you are able get the best you can. Buying here is all about compromises and even people spending millions rarely get everything they want. Figure out what is most important and try to focus on that. With inventory as tight as it is that’s a tall order right now