I had a similar problem. To hide prices for unregistered users in Magento 2 and display them only for authorized users, you can use extensions such as "Hide Price" or "Catalog Permissions". These modules allow you to flexibly manage the visibility of prices depending on the user's status. I myself faced this problem and used the services of the Amasti agency. They helped me
magento 2 hide product price , providing excellent compatibility with other modules and stability of the site. This approach ensured that prices are visible only to authorized users, and there were no problems with updates or performance.