Borrowed from Ancient Greek μέγας (mégas, “great, large, mighty”).
Practice speaking and memorizing "mega-" and many other words and sentences in Portuguese.