Chosen Solution
This is an update to an older question I have asked since it was pretty vague. So when I was disconnecting the battery of the phone i used a screwdriver which caused a spark and after that the sound would only work if i pressed the area above the sim card slot.
since you say there was a spark when disconnecting the battery you could have maybe damaged the audio amplifier or surrounding components which is on the other side of the board behind the battery connector and has a path to the battery line ( pp_batt_vcc )