I can't duplicate that issue here (iMovie 10.1.12, Mojave)â€”sound always plays inside iMovie as expected. Check to make sure the audio clip isn't muted, or the volume accidentally turned all the way down (via the little speaker icon at the upper right). You might also check if audio plays in other iMovie projects (or if it's a project-specific issue), and if sound from other sources (iTunes?) plays correctly through the same Mac output (to see if it's a general Mac sound issue or an iMovie-specific sound issue). I don't see any option to select an audio output device in iMovie Preferences, so I assume sound should be playing from the built-in Mac audio output.
Here's Apple's official troubleshooting advice for missing sound in iMovie:
I've linked this thread to one of our iMovie coursesâ€”maybe you'll see something in there that will help, or perhaps another user has encountered this issue and will have some advice. The link below will take you to other iMovie 10 training videos..