You'll need an active subscription, whether paid or free trial (see bullet points), to Minecraft Realms/Realms Plus.
I've actually done this a few times - taken a copy of a world from my Xbox One so that I could play it on my Windows 10 PC (the concept is the same) - but there are a couple of prerequisites: