It is good that you have sound again ..... regardless what kicked it into life
Looking at the picture you posted in the top of the thread, it seems to indicate that you have a HDMI connector (HDMI) and also separate sound (ACL888) connectors.
If that is the case then it is easy for apps to pick up the sound device which you are not using, output to that, and so you hear nothing.
The most definite means of ensuring the correct sound sink is used is to disable to unused one.
There are several ways this can be done ...... disable it in BIOS; disable it via the device management as shown in the picture; use Pulse Audio configuration to disable it; or manually edit some files to disable it. There may be more methods too ......
The alternative to disabling the unwanted device is to give the devices priorities, pushing the unwanted one below the desired device.
Anyway, all is good for the moment