Go to Settings-> Do Not Disturb->Allow Calls From to see whether it's enabled. If required, you can disable this function.
You may also disable DND and then silence your iPhone by pressing the actual ringer button.
How to fix an iPhone 7 Plus that plays notification sounds even in silent mode