CameraX is a support library created by Google which comes from android Jetpack components.
It is designed to support the camera of multiple android devices consistently without writing device-specific code.
It is actually based on the old camera-2 API.
Some additional advantages include the camera being life cycle aware.
It uses the concept of use-cases, meaning every time you want to implement a new feature we make a new use-case. The feature means things like taking a picture. If you want to create a QR-code reader we need to create a image-analyzer use case etc