Question about taking a program from one Arduino board to another board.

An advantage of using a piezo is that you can get an analog output from it which varies with the force of the vibration, which allows you to set a threshold for the trigger force. You could probably achieve that to some extent with a vibration sensor since it will be bouncing on and off for longer with a stronger impact but it will not be such a fine grained output as the piezo in my experience.

You don't necessarily need a specialized piezo impact sensor. You can use one of the super cheap piezo disks usually used as buzzers. They come in a variety of diameters but I didn't find a very significant correlation between size and sensitivity in my crude tests. I found it worth buying the ones with the leads already soldered since I had trouble soldering to those things. There are a ton of tutorials for using them as a "Knock sensor" or "Knock lock" you can find online, including this one: