The endpoint https://api.mojang.com/user/profile/<uuid>
previously returned a valid JSON object containing the username linked to a UUID. Sometime between December 11, 2023 and February 2, 2024 this endpoint was removed. It now always gives a 404 Not Found.
This is a fairly impactful change, searching on GitHub for usage of this endpoint gives quite a few results back: https://github.com/search?q=https%3A%2F%2Fapi.mojang.com%2Fuser%2Fprofile%2F&type=code
Yeah.. it's quite a problem for me aswell.
Guess I'm going to temporarily workaround it by using https://sessionserver.mojang.com/session/minecraft/profile/:uuid instead.