Trade from someone
Win from auction house
Berry garden
Luck while adopting eggs from lab
Golden game slot in Game Center
Magearna raffle
Getting summon items from boxes and using them at the ancient cave
If you are referring 'better pokémons' as
'Legendaries', then, there's a
guide for it.
You can get legendaries in many ways, all are listed in that guide.
You can even trade them with other users (except Dex
legendaries only when you have their egg dex).
Completing dexes, interacting during certain events, rumble maps,
gts, auctions, berry garden, event distribution, royal tunnel,
ancient cave, game center, gem collector, safari zone with a rock,
fishing, tall grass if you have the legend chip and a neb stone,
resolute stone, or egnima orb, lab, scs, and rarely from sky gifts