I have nokia 7 plus and android pie on it,
Please take a look at the DND settings and tweak it to your needs. By default DND allows alarms and media to play but silences Calls and notifications.
It looks like you're new here. If you want to get involved, click one of these buttons!