Many iPhone 8 and 8 plus users are complaining issue in the phone that the iPhone 8 makes a strange noise when home button is pressed or when it vibrates or when you 3D touch the screen. This may be described as a cracking noise. This is not happening every time but can be observed after some time. It seems to happen randomly when multiple notifications come in back to back. It almost sounded like the sound was coming from the speaker. It’s not a clicking noise, mine truly sounds like the “buzzer”.
A iPhone 8 users said about the issue “I went to double click the home button to close out of some apps, and all of the sudden it made this loud sound every time. I turned my phone off and back on, and I made sure I had the iOS up to date. Nothing helped.”
Usually in such cases where hardware seems to create trouble you should take your iPhone to nearest Apple Store, try going to an Apple Authorized Retailer. Stores marked "Apple Authorized Retailer" are approved stores by Apple and are safe to go and have your phone diagnosed and repaired at. I would recommend going to one of these stores to get your iPhone looked at as this is a problem that cannot be fixed by the user. Many user have replaced the iPhone 8 to new one as some pieces seems to be defective.