I have this exact issue, in my case it will doxx me if I want to share music to strangers
Hi there folks,
Thanks for reaching out.
The username of the account is indeed contained within shared links to it. For quite a while now, creating an account will generate a random username for your account that is designed to be unique, allowing your account to be uniquely identifiable while still letting you use any display name you want. However, if you have an older account before these randomized usernames were introduced, those could have customer usernames that couldn't be changed. If this presents a security concern for you, consider creating a new account, that one will surely have a random username. Our support team can help you with that, including with transfering your library to a new account.
Hope this clears things up.
Unfortunately nobody can : Username and display name - Spotify