Ok? What have you done to troubleshoot?
Any Bluetooth devices connected?
You say “in most” calls—so if you are heard in SOME calls your phones hardware is most likely fine. It’s perhaps some rogue app or BT device thats taking over your microphone. Maybe after you use some app that has access to your microphone it doesn’t “release” it sometimes.
Of course, cache flush, reboot, factory reset are all in order.
If you're rooted or some other mischief, all bets are off.
Your situation is unique, but with a little more info perhaps someone can read and help.