Having done both, this is what I would say:
Both scratch (at least the high end Home Depot stuff does), and they're both going to be decently expensive to install compared to carpet. If you have any sort of water issues, LVP is the worst to pull up. Water will sit on hardwood (or soak in some), soak into carpet, but will seap underneath LVP so you have to pull it up (which is awful).
I've put some LVP in bathrooms, kitchens, etc. It was a mistake, I should have done tile. Not that I've had issues there yet, but tile would have been cheaper, more durable, and more easily repairable.
If I had to do some of them again, I would do (in this order):
Tile
Carpet
Hardwood
LVP
Tile is more durable/repairable and costs the same about (maybe cheaper), carpet can be dirt cheap and install is cheap/fast, hardwood can be refinished and lasts a long time. LVP is more of grey area right now as far as long term results.
I actually used LVP on the advice of this forum. In hindsight, it would have been far better for me to do more tile/carpet and use LVP sparingly. Tile will outlast LVP and carpet's like 1/2 the cost installed, so it's hard for me to make a compelling LVP argument. Like if the faucet in the kitchen breaks and leaks all over the floor, you'd be ok with tile or hardwood...LVP you're probably going to have to pull up unless the supposedly waterproof joints work.
I guess my advice is, LVP is great unless you have an issue with it (broken plank, water). Then it's a nightmare, at least for the click joint stuff.