With Android Jetpack components a lot of things are happening here and there. Nowadays most of the developers tend to use Single Activity architecture, with that communicating between fragments become more crucial.
There are multiple ways to communicate between fragments. For example, using Interfaces or a shared ViewModel. But, this is sometimes additional overhead. As an alternative
setTargetFragment could be used but, this is also now deprecated.
So, let's look at the modern way.