They tried this once didn't go any where - they engrave the firing pin or part of the gun so it leaves a ID impression on the case when fired - just more dumb shit
The the firing pin strikes the cartridge it’ll imprint a code too the casing. Basically giving it a individual code linked too the owner.
One of those feel good measure that won’t work, isn’t practical. California enacted it some time ago. But there’s not a manufacturer willing too do it.