The PM9 uses a delayed blowback action, and the delaying is done by a rotating flywheel-type block and clock spring. The bolt and flywheel act somewhat like the piston and crank in an engine. As the bolt (piston) moved rearward in a straight line, it forces the flywheel (crank) to rotate because the two are connected. In the case of the PM9, the connection is a nub on the flywheel that rides in a vertical slot in the bolt. The flywheel is pushing against the clock spring to rotate, and the combination of the its inertia and spring pressure keep the bolt closed long enough for pressure to drop to a safe level. The rotary action allows this to be done in a much smaller package than typical submachine guns.
Ian’s video: [12:15] https://youtu.be/S3vH7LgvuL4?si=
This thing begs for a 3DP version. The action’s components can’t be that difficult to produce, and I’d bet Colt SMG magazines would work for it. Also, make the stock so that it holds the magazine in a horizontal orientation and have a folding grip and this thing could have 25-30 rounds in a package the size of a rolled-up Sunday newspaper.