Hey Lucas!
Nice to meet you! I'm Darhyl, an Independent Advisor. I'm sorry you are experiencing this with your Minecraft Java Edition.
Based on your description and since you're unable to access your Xbox privacy settings, this can only mean that your Xbox account is a child account. A child account can't manage its own privacy settings. You will need assistance from an adult account to manage the settings for you.
If your account is not added to any Microsoft family yet, to fix this kindly create a new Microsoft adult account with a new email address on account.microsoft.com
Note: Ensure that the adult account's birthdate registered is 22 years old or older.
Once you're done using your newly created adult account, add the child account (your main account) to your Microsoft family as a "family member" by signing your adult account on account.microsoft.com > Family tab.
Note: It is important that the adult account is the "Organizer" and the child/main account is the "Family member" to make this work.
Once the child/main account is added to your Microsoft family, you can proceed to use the adult account to manage your child account's privacy settings according to the official Xbox website: https://support.xbox.com/en-US/help/family-onli....
"Sign in to your adult Microsoft account at Xbox.com.
Select your adult account's gamertag, and then select the More actions button (…).
Select Xbox settings, and then select Privacy & online safety. Because you’re accessing sensitive info, you might have to enter your password or PIN.
Select the gamertag for your child/main account that you want to manage.
Select the Xbox Series X|S, Xbox One, and Windows 10 devices Online Safety tab or the Privacy tab.
Review the current settings and update all of the options as "Allow" and "Everyone", and then select Submit to save the changes.
Note: You must select Submit at the bottom of the page before leaving or switching to another tab. If you don't submit the changes before you move to the other tab, your changes won't be saved."
Wait up to 24 hours to make sure the changes will be applied.
Then have your child/main account sign out and re-sign into Microsoft Store and Minecraft Launcher to see if the multiplayer works.
Thank you for your kindness and understanding! Please feel free to let me know if you need anything else.
Best Regards,
Darhyl