It's also not simply a matter of agreeing on what tasks to use. The task has to be computationally difficult to perform, but computationally trivial to verify. It must also be verifiable with only the context of the blockchain (no "oracle" that can make claims about real-world events).
Primecoin exist(ed?) and used the search for Mersenne prime numbers as its proof-of-work. That was 13 years ago and is still the only example I know of "proof-of-useful-work", and it would not be difficult to find sour voices challenging its usefulness.
While they don't have that many in the wild, the number of implementations it lists is still more than I expected. There's also the Monero 51% takeover, which was purportedly done using a PoUW technique to garner more hashing power.
Primecoin exist(ed?) and used the search for Mersenne prime numbers as its proof-of-work. That was 13 years ago and is still the only example I know of "proof-of-useful-work", and it would not be difficult to find sour voices challenging its usefulness.