Hi, I'm Robinson, and I’m happy to help you today.
I know how frustrating this may be for you but I'll do my very best to help you.
You can see at these links some troubleshooting for the error "unable to connect to world".
https://educommunity.minecraft.net/hc/en-us/art...
https://help.minecraft.net/hc/en-us/articles/44...
https://www.drivereasy.com/knowledge/solved-min...
Note: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products).