We use rightly to give an opinion or viewpoint on something. ... It means 'in the opinion of the speaker, in a morally correct way', and is more subjective than right: He rightly took the money he had found straight to the nearest police station. (In the speaker's opinion, this was the morally correct thing to do.)
Do it right or rightly?
Right and rightly can both be used as adverbs. In the sense 'correctly' or 'in the right way', right is the usual adverb. It is only used after verbs: He did it right.
What is the difference between right and rightly?
As adverbs the difference between rightly and right
is that rightly is aright, in a right manner, correctly while right is on the right side or right can be exactly, precisely.