That is the only way I know to put a price on something, and this is clearly not a reliable process (see all the scams) but is there anything better?
The problem with market value is that it downplays the needs of the poor, and is sensitive to all kinds of regulation (intuitively, if regulation makes the same thing more expensive, it doesn't make it more valuable).
The problem with use value, as defined by Marx, is that it ignores the differences between individuals, and technically the needs of individuals at all. It simply means "what the one who controls the society considers valuable". (If you think this is a strawman, just read the Wikipedia article carefully.) Of course, it is assumed that the one who controls the society is omniscient and can determine the value correctly, but that's just answering the question by passing the buck to a hypothetical omniscient entity. (And if you look at actual communist societies, it turns out, perhaps surprisingly to many, that the ones who control them are neither omniscient nor benevolent.)
What seems to work best, so far, is a hybrid system where:
* the value of million little things (often not useful per se, but as a raw material for something else) is determined by the market;
* some form of social security ensures that anyone's needs have a non-zero weight;
* the "socially useful but not market profitable" projects are paid for by taxes and charities.
In other words, the "use value" can be implemented on top of "market value" by financing things by taxes and charities. In the opposite direction, the "market value" can also be implemented on top of "use value" by trading the government-assigned things on black market; the only problem is that this is typically considered illegal. The fact that both things occur naturally in different kinds of societies suggests that both are necessary. (And the proposal of "free market with unconditional basic income" is how they could exist side by side without having to implement one of them as a hack on top of the other. The last component you need is some kind of Kickstarter.)
And value to what? As an ex-physicist I can confidently say that doing that was substantially harder than the ML I do now. But I also think that what I did provided more value to society as a whole. Just my opinion though. But it doesn't pay well (<$100k/yr) and I'm not surprised I saw a mass exodus of people trying to get more money with their math skills (mostly in DS and CS). If pay was correlated strongly to difficulty mathematicians and physicists would be paid much more than Hollywood actors. But for some reason these conversations always revolve around the (barely a) millionaire class and never include the billionaire class. It feels surreal in that it looks like we're fighting for crumbs and arguing who deserves it more.