Let's see a brief explanation about these terms in a nutshell.
- Android-Activity is independent, it can present the view itself.
- Android-Fragment can't run independently and requires an Android-activity as its host, which means that when the Android-activity is/was destroyed then the Android-fragment will be too. The Android-fragment does not strictly specify which Android-activity should or can host it, as long as it is an Android-activity then you're good.
- Both Android-activity and Android-fragment can have ViewModel.
- ViewModel is always dependent on Android-activity or Android-fragment lifecycle, which means that when the Android-activity/ Android-fragment is/was destroyed then the ViewModel will be destroyed as well (except for configuration changes).
Let's see some relationships defined in the UML class diagram.
- Composition (not sure, since the Android-activity doesn't depend on the Android-fragment)
- Aggregation (not sure, since the Android-fragment will be destroyed if the Android-activity destroyed the same with the ViewModel, where aggregation encourage that both parties can live with its own)
- Association (maybe yes or no?)
- Dependency (maybe yes or no?)
Generalization (definitely no)
Realization (definitely no)
Now, to model them on UML Class Diagram, there are some questions:
- What is the relationship between the Android-activity and the Android-fragment?
- What is the relationship between the Android-activity/ Android-fragment and ViewModel?
In both cases, the appropriate relationship is a composition, because the child is destroyed when the parent is destroyed.

Multiplicity 1
means that every Fragment requires an Activity.
Multiplicity 0..*
means that multiple Fragments can be part of the same Activity, but an Activity does not necessarily have any Fragment.
The relationships for ViewModel are as follows:

UPDATE: In your question, you have added an exception for configuration changes. In that case, the relationships with ViewModel are not compositions. But if you don't want to let this exception influence your model, you could add a note in the diagram explaining the exception.