They can be synonyms, or maybe a little bit different. Mainly (adverb)
= chiefly = principalmente
They eat mainly fruit and nuts.
‘Where do you export to?’ ‘France, mainly.’
The population almost doubles in summer, mainly because of the jazz festival.
During the day it’ll become mainly dry with clear skies.Mostly
(adverb) = mainly; generally = na sua maioria, quase na totalidade, principalmente
The sauce is mostly cream.
We're mostly out on Sundays.
I guess "mainly" is more natural when speaking.
As for "mostly", see the link:moslty no EE