So if its a new gun they can go to the manufacture and find what dealer and who the dealer sold it to.
Whether the gun is new or old doesn't matter. When it was transferred does.
When local LE request ATF to do a firearm trace, ATF first checks with the manufacturer who tells them where they shipped the gun, eventually leading to the dealer and the first retail customer who filled out the Form 4473. The dealer emails that 4473 to the National Tracing Center. ATF may or may not contact that customer.
If the manufacturer or dealer is out of business, ATF will have their bound books and any 4473's less than twenty years old. They'll go into a shipping container with a flashlight and find the 4473 from that sale. If the 4473 was over age twenty and the dealer destroyed it, then all ATF will be able to look up in that dealers bound book is the name of the customer and the date transferred.
But what if a dealer gets a 50 year old gun that comes in, and they fill out the form and it stays with the dealer unless they go out of business ect.
A pistol made in 1971 would have been transferred according to the 1968 Gun Control Act, the recordkeeping virtually identical to how it happens today.
For a firearm made prior to 1968? It depends on how well the manufacturer kept records. Rifles and shotguns weren't even required to have serial#'s until the GCA'68.
How does ATF even know where to look with no data base?
They requesting LE agency gave them the manufacturer, model, caliber and serial# engraved on the firearm. So ATF starts by contacting the manufacturer.
Lots of phone calls, faxes and emails. A licensee must respond to a firearm trace request within 24 hours, so manufacturer>distributor>dealer.
A couple of years ago, in a 2-3 week period I had two trace requests:
#1 was for a Glock frame that was in my safe, awaiting pickup by the buyer. The seller, a pawn shop in GA was taking new Glocks, selling the frames separate from the slide/barrel assembly. The requesting agency pulled the serial# off that slide or barrel, not the actual firearm. So next time you go to build out an 80% frame, think about who may have the original frame.
#2 was a pistol that my customer had in his safe! I asked him to send me a photo of it on top of that days Dallas Morning News with the serial# visible. "Uh, the requesting agency must have made a mistake" said ATF. Ya think?
https://www.atf.gov/resource-center/fact-sheet/fact-sheet-national-tracing-center