There are apps to block the camera and microphone.
Android only allows one app at a time to access either of these items.
So, these apps simply tell the device that the camera/microphone is in use, and so no other app can then use them.
Technically, if someone wanted to access your camera or microphone, they would do it through an app that is already on the device.
That is why it is so important to check the permissions of the apps that you put onto and that are built into a device.
To further the issue, when apps are updated, permissions can be added or changed, and this should be monitored.
Last but not least, the blocking apps for the camera and microphone are basically guaranteed to block any unauthorized use of them from USER apps- the apps that you download and install yourself- but there is no guarantee that they will block access from SYSTEM apps- the apps that are permanently on the device from the carrier and the manufacturer.
In my opinion, the best blocking apps will have a device administer function built in.
This makes it much more difficult to dodge the blocking app.
The last thing to consider is how much do you trust the developer(s) of the blocking app?
The most trustworthy apps are open source, meaning that the code can be inspected by anyone- so they have nothing to hide- and are referred to as FOSS (Free Open Source Software).
Also, since the business model of Google is to accumulate information about its users, you may want to thoroughly inspect any app you get from there- especially a blocking app like we are discussing.
A great app to check the permissions and other things in apps is called Addons Detector.
https://addons-detector.en.uptodown.com/android
A good microphone blocker that is open source is called PilferShush.
(No device administer, but the developer has his reasons.) This app can also give information about the spying potential of other apps on the device.
https://f-droid.org/en/packages/cityfreqs.com.pilfershushjammer/
As for a camera blocker, the one I use seems to no longer be available anywhere.
I have no idea why.
So, I will leave that choice up to you.
Remember that any blocking app must run continuously (a device administrator really helps with this) and so your battery life per charge may take a hit, although a well written app should make this unnoticeable.
If you really want to prevent spying on you through your device, you can look up how to make a 'bogphone', but be advised that your online activity is monitored by many.
The camera and microphone can be physically removed.
No phone needs a camera to work, and a wired (preferred) or bluetooth headset with microphone will take the place of the removed microphone.
There are Faraday cages available for devices, that prevent signals from getting into or out of any electronic device.
And don't forget about the keyboard app that you are using.
The keyboard can have the capability of sending everything that you type to someone else.
Personally, I use keyboard apps that have no suggestions, no predictive text, no user dictionary, an no internet accessibility.
At the very least, these items should be turned off. (Are they really off, though?)
Are you using G-Board?
If so, I would drop that one ASAP.
There is just so much to list here.
Of course, the powers that be are probably monitoring all of this thread as well...