A lot depends on what state you are in. In Calif you cannot attach a vin to a different body, you could repair the wrecked body with new parts. If the car has a “salvage title” it will require an inspection from the Ca. Highway Patrol; if they cannot confirm the numbers they can “blue tag“ it (assign a new vin) and rivet it to the door jamb. If they suspect the numbers have been altered, or removed and replaced, they can, and likely will, seize the car.
In Washington State they do not allow salvaged cars, period. But you can construct a new car with a Dynacorn body and the state will assign a vin to it. This vin will not match the original, the car would be a 2021, and I think you will have to comply with modern smog standards