There are several problems with that. First, Ultra Necrozma isn't even in the Sword/Shield game code, so editing your save would never work for that.
Second, even in Ultra Sun/Moon, Ultra Necrozma is a battle-only form. It will never be legal in PKHeX. You would need to create a Necrozma and a Solgaleo/Lunala, fuse them with the appropriate items in-game, give the resulting Pokémon an Ultranecrozium Z, then activate it in battle. But even creating a Necrozma and one of the other two is hard, the best way is to catch them naturally and then edit the stats, or download .pk7 files from this site.