It is legal to make your own gun
If you can legally own a gun in the United States, then you can legally make your own gun in the United States. Excerpt:
It is 100 percent legal for a private citizen who is not barred from owning or possessing a firearm to manufacture a firearm, creating a ghost gun, as long as the resultant firearm does not violate any state or federal laws. This means that as long as you are manufacturing a firearm that would be normally sold over the counter where you live with a standard 4473, and as long as it is legal for you to walk into a store and purchase such a firearm, you are not breaking the law. This has always been the case, and as long as you are not then selling those firearms, you are in the clear. (If you’re looking to manufacture anything more exotic than a regular old pistol, rifle or shotgun, you’d better have your federal NFA paperwork in order and your NFA taxes paid. If not, you’ll end up committing one of the only types of gun-related crime the feds DO, in fact, seem very interested in prosecuting...
Like it says, "ghost gun" is just one more imprecise, scary word used for political purposes. We should not use it unless we clarify what we mean by it. It is not an illegal gun, just a gun made by a private individual and as such, it will not have a serial number on it. Serial numbers provide some degree of traceability and thus makes it much easier for the geovernment to regulate serilaized guns.
If I was going to sell a gun which I made myself, I would just sell it in two parts to someone on different days. Then I would tell the person that if they are asked where they got the gun that they should answer that the bought the parts separtely and assembled it themselves. This is still 100% legal. If the buyer said "Pauli sold me the gun," and then I was questioned I would state that I sold parts and not a fully operational gun. That is just what I would do.