Hi FIKO11,
Thanks for contacting Apple Support Communities!
We understand that your iPhone mutes calls and switches to speaker unexpectedly on calls.
Do you have any devices connected to your iPhone such as Bluetooth, Lightning or USB-C accessories?
Also, check out this article which explains how to troubleshoot your iPhone display for unexpected touch: If the screen isn't working on your iPhone or iPad - Apple Support
"If your screen is too sensitive or responds intermittently to touch
- Restart your iPhone or iPad.
- Make sure that your screen is clean and free of any debris or water.
- Disconnect any Lightning or USB-C accessories. If your screen works after removing an accessory, try using a different outlet, cable, or charger.
- Remove any cases or screen protectors.
Contact Apple Support
If your screen still isn't working, you might need to set up service for your device. Contact Apple Support."
We hope this helps.
Cheers!