Applying XP to a pre-created adventure with milestones?

I have bought my first DnD adventure, Dragon of Icespire Peak, mainly because I wanted a good opening adventure to introduce some new players to the game.

However the module uses milestone leveling with clear advice to increase to level 1 after quest 1 and then increase based on the successful completion of quests thereafter.

I am planning on this to be an opening intro to a wider campaign I have planned and have tweaked the setting accordingly however I generally run my campaigns based on experience points, largely because I run a very open world players can do anything including ignore the main story, type of campaign. I don’t have anything largely against the way players will level through the adventure but I don’t want them to get to level 5/6 and then suddenly start handing out XP as we move into my own material.

Are there any clear rules to converting the milestone based adventures into XP style games? I can easily work our roughly how much XP the various monsters will return and then work out what completing the quests/role playing bonus should give to allow the players to advance at roughly the same pace but are there any official suggestions as to how to do this?

Just to add some clarity, I will be running for 6 players, and these are mainly new players so I want to be able to use XP to reward role playing and good gamesmanship as well as just completing the quests and killing stuff.

How do I handle milestones for levels?

I understand the concept behind milestones, and what the DMG recommends. I was planning to use old fashioned XP-per-encounter for my campaign, but the more I read the more I prefer milestones.

My question is, how do I handle milestones in a sandbox setting? In a more linear story it is easier, as I have set points of the plot where the characters can level up. In a sandbox, however, players can ignore the main story line in favour of the smaller quests and villains, each of which is insignificant in the grand scheme of things. How do I handle milestones in this case?

An example to clarify

I would like to run a campaign where something big is happening in the world (e.g. gods are about to go to war, or 2 different nations). The PCs will be in that world and could possibly be involved in this overarching “incident”. I, as DM, could throw something their way to incentivise them to get involved (e.g. they find something one of the sides is looking for), but they would be free to ignore it or follow their own backstories (while the overarching “incident” is moving along) and they can get involved later.