Hi Forza,
Here are the possible troubleshooting steps to solve your issue:
1: Re-add your friend
I believe you’ve already tried restarting Minecraft maybe even restart your computer. There is one more thing you can try: re-add your friend.
If you find you can still connect to a stranger’s world, you can remove the person as a friend then re-add him/her back may solve the problem.
2: Check for Windows Firewall
If Minecraft is not allowed in the Firewall, the “Unable to connect to world” issue can happen. You can still connect to the internet but can’t join each other’s world. So check the Firewall settings and ensure the Minecraft executable file “javaw.exe” is allowed in the Firewall.
Click the Windows start button, type control panel and press the Enter key on your keyboard to open Control Panel.
Set Control Panel view by Large icons then click Windows Defender Firewall.
Click Allow an app or feature through Windows Defender Firewall.
Make sure the “javaw.exe” is checked. If not, click the Change settings button then check the “javaw.exe”. If you see more than one “javaw.exe” entries, check all of them. Ensure the Private box and the Publick box are checked too.
If the Minecraft.exe is checked, this fix doesn’t work for you. Move on to the next fix.
3: Disable antivirus software
Some antivirus software may block some features in Minecraft so that you can encounter the “unable to connect to world” issue. If you have installed antivirus software on your computer, you can disable it temporarily and check to see if the problem is resolved.
IMPORTANT: Be extra careful about what sites you visit, what emails you open and what files you download when your antivirus is disabled.
4: Change the settings
Check you and your friends’ settings in Xbox.com. The changed settings may be the reason why you’re unable to connect to the world.
Go to the Xbox official website.
Click the Xbox One/Windows 10 Online Privacy tab.
Find Join multiplayer games and make sure it’s set to Allow.
Click Submit.
5: Update the network drivers
Outdated network drivers may cause the “Unable to connect to world” issue. So you can try to update the network driver to fix the problem.
Please let me know if these steps helped you out.
Your feedback is much appreciated.
Thanks and regards,