You are going to need:
A Nintendo Switch console, a free Pokemon Home account, a Pokemon Go account, a copy of Pokemon Sword or Pokemon Shield, and a copy of Pokmeon Let's Go Pikachu or Let's Go Eevee.
Step 1: Catch Meltan in Pokemon Go
There are two ways you can get Meltan in Pokemon Go. The easiest is if you own Pokemon Let's Go Pikachu or Let's Go Eevee. If you transfer a Pokémon to one of the Let's Go titles, you will be rewarded with a Mystery Box in Pokemon Go. Activating the mystery box will make Meltan appear around you as if you had used incense. Every now and then during special events a Shiny Meltan may appear in these mystery boxes as well, so keep an eye out for another Shiny Meltan event in Pokemon Go!
If you don't have a Pokemon Let's Go title, unfortunately you won't be able to send Pokemon from Pokemon Go to Pokemon Sword and Shield at this time. That will change when Pokemon Home becomes compatible with Pokemon Go. But that shouldn't stop you from getting ready. You can still access a single Meltan by completing the Let's Go, Meltan quest.
Step 2: Evolve Meltan in Pokemon Go!
That's right, the only way to get Melmetal at the moment is to have it already evolved in Pokemon Go! It requires a whopping 400 candies, which will take a long time not to gain access to the mystery boxes. It takes 20km to get a single candy by walking with Meltan as your Pokémon friend, so using rare candies or catching more is the best way to refuel. Meltan also counts as a Legendary Pokémon, so it can only be traded as a Special Trade once per day at an increased cost of Stardust. However, trading one Meltan per day for a distant Pokemon gets you three times as much candy as transferring it, which can be worth the cost of 800 Stardust for Best Friends.
Step 3: Send Melmetal to Pokemon Let's Go Pikachu / Eevee
You can access your transferred Pokemon from Pokemon Go in Fuchsia City Go Park. From there you will need to grab Melmeal, but don't worry, there is no chance he will get away from you. If you talk to the Fortune Teller in the Pokemon Center in Celadon City before catching Melmetal in Go Park, you can change the nature of your Melmetal when you send it to Pokemon Sword and Shield!
Step 4: Send Melmetal to Pokemon Home
You need to download at least the free version of the Pokemon Home app on your Nintendo Switch to complete the transfer process. Once you have it up and running, moving Melmetal should be a simple process to find it in your Pokemon Let's Go game's PC Box and then move it to your free Pokemon Home Box.
Step 5: Send Melmetal to Pokemon Sword and Shield
Now that Melmetal is in Pokemon Home, the last step is easy! While Pokemon Home is open, simply go to the PC box of your Pokemon Sword and Shield game and find a nice place to put your Melmetal!
Step 6 (optional): Gigantamax your Melmetal
Gigantamax Melmetal is not yet available in Pokemon Sword and Shield. It will likely be released along with many other Pokémon in the Crown Tundra DLC set to release this fall. However, you can still prepare for its release, as once it is available it will likely be possible to feed Melmetal a Max Soup from the Isle of Armor DLC. You can find Max Mushrooms in the caves of Isle of Armor, which can be turned into Max Soup in the Dojo's kitchen.
Max Soup can make any Pokemon with a Gigantamax form capable of Gigantamax in battle, so this would be a good place to get other Gigantamax Pokemon from Pokemon Go such as Venusaur, Charizard, Blastoise, Butterfree, Pikachu, Meowth, Machamp , Gengar, Kingler, Lapras, Eevee and Snorlax! Check out the full list of Pokémon you can send from Pokemon Go here. Just keep in mind that some Pokemon Sword and Shield competitions do not allow Gigantamax Pokemon.