This is a quick showcase of a method I've found for printing functional keys.
DISCLAIMER: Don't break stuff off in your locks, like, for instance, 3d printed keys. For a lock in use, I would not recommend using plastic printed parts for turning the barrel, and rather use something metal in the keyway to provide torque.
Uh... also don't do illegal stuff.
Printer: Bambu P1S
Filament: Black PET-G HF by bambu
3d Scanner: Creality Raptor CR
Turntable design from Payo (found on youtube)