Screen goes black during call

Often, when I try make a call or use the phone app on my phone, the screen goes black. I have a Pixel 1 with Android version 9. This is a problem because I can’t see or use the numbers or buttons on the screen! What is the fix?