If you do not want to use the Dictation feature on your iPhone, you can find below the steps to remove the Microphone button from the Keyboard on iPhone.
Remove Microphone Icon from Keyboard on iPhone
Although, the Microphone button is prominently visible on iPhone keyboard, many users simply ignore this button, not really knowing what to do with it.
The purpose of Microphone button on iPhone Keyboard is to allow users to type by speaking words, phrases, sentences into the Microphone, instead of actually typing them.
If you are unlikely to type using voice, iPhone provides the option to disable the Dictation feature, which also removes the Microphone button from iPhone Keyboard.
When you remove the Microphone button from iPhone keyboard, it only disables the dictation feature on iPhone and has no impact on the Microphone in Messages App.
You will still be able to send Voice Messages using the iOS Messaging App on iPhone, even with the Microphone icon removed from iPhone Keyboard.
Remove Microphone Button from Keyboard on iPhone or iPad
Go to Settings > General > Keyboard > scroll down and move the toggle next to Enable Dictation to OFF position
On the confirmation pop-up, select Turn Off Dictation option.
After this you will no longer see the Microphone button on the keyboard of iPhone. This also means that you won’t be able to use the Dictation Mode while using the virtual keyboard.
At any time, you can enable Dictation Mode and get the microphone button back on the keyboard by going to Settings > General > Keyboards > toggle ON Enable Dictation.
Leaving the Dictation feature enabled on iPhone can be useful for those who like the idea of using voice to type, instead of actually typing words using the virtual keyboard on iPhone.