Press the side button twice quickly to silence or decline the call. See the pic below

- When your iPhone is locked: An Incoming Call Screen takes over the entire display. You’ll see the full-screen slider saying “Slide to Answer”. There’s no Decline button — the only way to reject the call without answering is by pressing the Power/Side button once to silence it or twice to decline it.
- When your iPhone is unlocked: A Banner Notification appears at the top of the screen when you get a call. It shows the Answer and Decline buttons, so you can respond without interrupting whatever you’re doing. You can tap the banner to answer, swipe it up to dismiss without declining, or press Decline to send the call to voicemail.
Read the Apple Article: Answer or decline incoming calls on iPhone
This behavior is designed to avoid fully disrupting what you’re doing when the phone is already in use.