I’ve been searching all over the place trying to find out how to obtain one in sw/sh
Magearna is only obtainable via Event in Sword/Shield. The event specifically is for its Pokéball-pattern and it is gifted to you from Pokémon HOME for completing the National Pokédex.