Ahhhh.
I know what happened.
There are two wires inside your Tamagotchi that connect between the circuitboard and a yellowish disc that controls the sound. One or both of them may have been disconnected. It can be fixed in two ways.
1. This is the easiest way, though it's usually only temporary, and it only is effective if the entire wire came off instead of being broken in the middle somewhere. To fix this, take a very small piece of clear tape and tape over the little melted-looking area that had been disconnected, There is probably a spot where the wire had been, it is a different colour than the rest of the disc. Tape it back in place, but make sure the Tamagotchi can close again when you have finished. I have done this on both my V2 and my sister's V1. The V2 broke a long time ago but it still works after performing the operation once a few years ago, but the V1 broke in a different way after I performed the operatin a few times.
2. This way is harder, though permanent, and I have never actually tried it but it works in theory. If the wire itself is broken, or the melted part is disconnected, take a sautering gun (have an adult help you with this, I wouldn't trust myself with one of these) and sauter the two parts together.
The sound should work after that.