When using UML for modeling, five relationships between classes are required. From weak to strong, they are dependent, associated, aggregated, combined, and inherited. Their image styles and some explanations refer to my album.
The reason why classes are introduced in UML modeling and the relationship between classes is that object-oriented thinking is applied in modern software modeling. Object-oriented features include encapsulation, inheritance, and polymorphism. These features are designed to solve Software maintainability, stability, reusability, and other problems. To solve these problems well, we need to have an overall grasp of the system, and we need to have a good system design before coding. The overall architecture of our system is built by the interaction between classes and classes. The relationship between classes or between classes and interfaces will inevitably affect the stability, maintainability and reusability of the entire system.
I mentioned in "three basic features of Object-Oriented" that three features of object-oriented encapsulation, inheritance, and polymorphism should be used to implement software stability and scalability. In the design stage, their applications are the coordination of the relationships among the five types in UML. If you want to know whether you have coordinated and applied these three features, you must check whether your system design is reasonable (whether the system architecture is reasonable) during the design phase)
In short, the system is easy to maintain, stable, reusable, and must be well applied to the three basic features of object-oriented, to apply these three features well, you must design the system architecture and apply the five relationships between UML classes in the system design phase.