If you are talking about a handgun, only New York, Michigan and California have handgun registration. California, Connecticut and New Jersey register "assault weapons" and Hawaii and Wash. D.C. register both handguns and long guns. I am told that Maryland registers "assault weapons" automatically through dealer reporting but cannot confirm that.
All manufacturers must keep a record of which firearms went to which distributor. Each distributor must keep a record of which firearms went to which dealer. Each dealer must keep a record of which person purchased which firearm. That is where the trail usually ends. No one reports private sales. In a few states there are no "private" sales they can only sell through a dealer. In private sales a gun could change hands legally 20 times without any records.