Dry firing is essential to skill development. It can also help break-in a gun.
Any gun may be dry fired safely if its chamber is loaded with a snap-cap. Snap-caps are dummy cartridges with polymer or spring-loaded "primers" designed to accept, and slow, the thrust of the gun's firing pin. Snap-caps come in colors that clearly distinguish them from loaded cartridges, so they may be safely used for practice.
Any gun shop, and most mail-order dealers, sell snap-caps. They're not expensive.
Buy a set suited to your gun(s), and practice, practice, practice.
Although it's probably true that dry firing a pistol with a fixed firing pin (i.e., one attached to the gun's hammer) without a snap-cap will cause no damage, I prefer to use snap-caps in every gun with which I practice.
Many floating-firing-pin pistols will be damaged in one way or another from repeated empty-chamber dry firing. One or two "snaps" won't hurt, though.
Although modern guns are designed to accept it, I make it a practice never to dry fire a .22 rimfire. (It's a case of "suspenders and belt," I guess.)