without hearing the sound I cant be sure, but awful buzzing sounds are generally created from the power supply or fans, if its coming from the internal speaker however it could be anything from bad ram to bad motherboard

is the computer still starting up after the noise is made? if so its most likely a fan, try and turn the computer on without the side and and see if u can pinpoint the sound

if there is an internal speaker hooked up to the motherboard take that out and try and turn it on and see if you get the sound still

you are going to have to try multiple things until you pinpoint the cause, these are the easiest places to start