Lawfully has 3 different meanings across 1 category:
Adverb
in a manner acceptable to common custom
"you cannot do this legitimately!"
by law; conforming to the law
"we are lawfully wedded now"
Conforming to the law; legally
"The judge ruled that the new building was lawfully constructed despite its unconventional design."