During that 30 days, you'll be able to follow the instructions below as many times as you want/are able to migrate several worlds for free. Simply register for your trial and then cancel the subscription before the end of the 30 days to avoid being charged.
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: