Henninma, first try to look into the system information to make sure the audio hardware is properly detected and listed. If they're there, the sound chip is working. If the chip is not detected, do a SMC reset and see if it works.
In the audio config, check the sounds are output by speakers rather than headphones or optical output. also look into the headphone jack and see if there is some red laser. The output is probably stuck on headphone or optical output. Clean the connector to resolve the issue.
The sound chip is the cirrus chip above the battery indicator connector.