The easiest and best way is to buy a complete HK parts set. The barrel will be pressed and pinned into the trunnion plus HK parts are the best for quality. Many of the smiths that build the guns do offer retail sales of just the rolled receiver. Expect to pay $500 or more for a rolled receiver that will transfer through your FFL. For a SD you will want a SD can. Again there are several manufacturers. The NFA board would be a good a good resource for that.
Be fore warned, you are talking one of the most expense and difficult home builds possible IMHO. A HK SD parts set in good condition without a bulged barrel (with 147 grain or higher the ports in the barrel can bleed off too much gas and make a squib round stuck in the barrel) as there have been many PD parts sets with bulged barrels. How is your TIG welding skills? Even with a pressed barrel so you won't have to press and pin the barrel, welding the cocking tube and SD cage will not be easy. Like rolling your own flat, builders have heat sinks and jigs to put these guns together. These are trade secrets. Don't expect these guys to post how to do some of the tricky stuff. You will need to figure that out on your own. The guns were originally designed to be put together in an industrial setting not one at a time. The flat rolling jig is the tip of the iceberg. All this learning on parts ( US parts kit https://hkparts.net/product/mp5-sd-9...set-p18052.htm and is not in stock) that you paid a couple of thousand dollars for. I would expect to pay $2,500-$3,000 for a HK SD parts set. TPM Outfitters has a decent SD can https://www.tpmoutfitters.com/tpmsuppressors for $600 plus $100 - $150 transfer fee to your dealer and a one year wait. Have I scared you yet?
I'd love to try my hand at building a couple of guns and I own a TIG welder. All the reasons listed above, is why I don't. I bought a Coharie Arms CA5 SD about ten years ago for $1,450 including all SS SD can. About seven years ago, I had a couple of Special Weapons receivers I bought from Todd built into barreled SD receivers using SD front end kits (https://hkparts.net/product/mp5-sd-f...-kit-p2399.htm) by Jeff at PCS for $725 each. His price is now $900 for the same service. A SD is cool. They are not inexpensive or easy to build. YMMV.