Let's say that a spaceship explodes and sends pieces of debris everywhere around it. If I was close enough to be hit by one of these pieces of debris, would the sound of the explosion be transferred from the debris onto me so I could hear it?
The sound of the explosion will not be transferred by the debris piece hitting you. But you can possible hear the impact of the debris on you body because this creates acoustic waves that can reach your ear either via your body or via the air surrounding your ear.
"The sound" of the explosion is a perception your brain creates in response to signals in your ear-nerve, which are generated in response to excitation of sensory cells in your inner ear, which reacted to being jostled by the liquid inside your inner ear, which was pushed by a membrane, which was pushed by little bones, which were pushed by another membrane, which was pushed by air moving, which was moved by the expansion of whatever exploded.
In space, this chain reaction is stopped right at the beginning, as there is no air in space.
When the debris hits you, it moves your helmet, which moves the air inside it, which starts the chain described above - with one very important caveat: many things in space move faster than sound travels in air, and faster than signals travel in nerves (which is only about a third as fast as sound in air...), so you might not even hear the sound of the debris hitting your helmet, because you are dead before the signals reach your brain...
If, on the other hand, you survive, it is still possible you did not hear it, because the percept of sound is only generated if there is sufficient attention left. An impact on your helmet (the percept of touch and possibly pain are generated by signals from skin receptors that are possibly a little faster) may take all your attention.
If you indeed hear it, it is up to you to decide the philosophical question: Is hearing the debris hearing the explosion?
would the sound of the explosion be transferred from the debris?
In a vacuum the explosion has no sound.
There is no "sound of the explosion" which could be transferred.
Even in air at sea level, where explosions do generate sound, these sounds are not stored in macroscopic pieces of debris, moved with the debris and then released at another location.