From time to time we see news items about people's conversations being listened to when they are not using the phone. This is less of a threat on degoogled phones, but not a zero threat. We have recently seen a case where even the supposedly secure Signal app left a hot mic on in the receiving device even after ending the call. For these reasons I run the PilferShush Jammer app on all of my Android phones. It offers a choice of two methods to prevent your microphone from being used without your knowledge.
The app description in the F-Droid store provides a good introduction to the kinds of things other apps may do to hijack your microphone. The passive option is to simply lock the microphone as "in use" when you are not using it yourself, such as on a phone call. The active method actually generates tones to jam the audio signal when you are not using it. I prefer not to use this method because it is not 100% certain that an eavesdropping party will not be able to detect your audio sources over the jamming background noise, and also because the active method uses battery where the passive method does not.
I should also mention that there has been a lot of discussion about the fact that when your phone is off, it is not completely off. I have not seen any consensus as to what extent the microphone could be accessed on a powered off phone, so you might actually be more secure with the phone powered on and using PilferShush Jammer than when powered off. Also be sure to allow PilferShush Jammer to send notifications. That way you can see at a glance whether it is still running or not. Random events can cause it to shut off. I've personally seen OS updates do that as well, not always, but sometimes.
The app also has a nice App Inspector feature that informs you what apps you have installed that could potentially take over your microphone. Here is a direct link to the app description at F-Droid, but of course, you would install it directly from your F-Droid app store or favorite alternative F-Droid client.

PilferShush Jammer | F-Droid - Free and Open Source Android App Repository
Block unwanted use of onboard microphone