There are two types of binding in Android: View binding and Data Binding.

View binding example:

binding.name.text = viewModel.name
binding.button.setOnClickListener { viewModel.userClicked() }
Data Binding example
<Button
android:id="@+id/btnMyButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Save Settings"
android:onClick="@{() -> viewModel.onButtonClick()}" />
According to Android for Developers both can be used:
Comparison with data binding
View binding and data binding both generate binding classes that you can use to reference views directly. However, view binding is intended to handle simpler use cases and provides the following benefits over data binding:

Faster compilation: view binding requires no annotation processing, so compile times are faster.
Ease of use: view binding doesn't require specially tagged XML layout files, so it's faster to adopt in your apps. Once you enable view binding in a module, it applies to all of that module's layouts automatically.
On the other hand, view binding has the following limitations compared to data binding:

View binding doesn't support layout variables or layout expressions, so it can't be used to declare dynamic UI content straight from XML layout files.
View binding doesn't support two-way data binding.
Because of these considerations, in some cases it's best to use both view binding and data binding in a project. You can use data binding in layouts that require advanced features and use view binding in layouts that don't.