Software Design Patterns: Drupal's architecture and reusability

Software design patterns are crucial tools in the field of software development, providing developers with proven solutions to common programming challenges. These patterns encapsulate the collective wisdom and best practices of experienced software engineers, enabling the creation of robust, scalable, and maintainable code. In this article, we will explore the importance of design patterns in programming, their benefits, and some popular examples of design patterns using Drupal in most examples, because I try to bring Drupal into everything.
Why did Drupal decide to move towards Object oriented programming paradigm?
Drupal made a significant shift towards adopting the object-oriented programming (OOP) paradigm starting with its major release, Drupal 8 many many moons ago. I'm sure many wanted to know why. Drupal addressed the criticism of the lack of explicit use of object-oriented programming (OOP) in Drupal's source code and API by explaining the reasons behind their design choices. Here are the key points they mentioned:
Design patterns in Drupal

How dependency injection works in Drupal?
