I use Camera.MAUI to do that: https://www.nuget.org/packages/Camera.MAUI
You can also use it to make videos, use the front camera or flash and also scan QR code function quite well
For scan install also (even if no it doesn't work): https://www.nuget.org/packages/Camera.MAUI.ZXing/1.0.0