First, you need an expansion pass for any game to access the Isle of Armor DLC. In the game, it's not easy to catch a Shiny Pokemon. After completing the final battle of the Isle of Armor's storyline, enter Hyde's room and interact with Porygon hovering near Cram-o-Matic.
Hyde will ask if you like virtual Pokemon, and once you answer yes, he will say which type he thinks you are. After the talks excitedly about the virtual Pokemon, Hyde will let you have it. It's that simple.
For those interested, Porygon's Pokedex description reads: "In recent years, this species has been very helpful in cyberspace. These Pokemon will go around checking to make sure no suspicious data exists." Buy Pokemon is the best way. This is currently in Pokemon Sword or The only way to get Porygon in Pokemon Shield without swapping one from other pocket monster games that you inevitably play.