I will try to answer based on my understanding of your question as long as I need to help you. if you still need to ask anything, please leave a comment otherwise don't forget to rate my answer.
Access modifiers (public, private, etc
) were built to achieve abstraction and encapsulations
within your classes, both of them are key concepts of object oriented programming. so you have to analyze your requirements what you should reveal or disclose to the outside world especially if you want to ship your code and be used in different systems and you don't need other developers to change some properties which are used internally only for example something like database connection string
.
Modular where you define your public functionalities through interfaces and implement those interfaces.
Also, one principle it came to my mind where you should favor composition over inheritance to to avoid lots of code changes and breaks and dependencies.
Dependency Injection frameworks helps you to inject your modules, for example Spring framework came with dependency injection.
All of these principles will achieve Open-close
and Liscov substitution
principles that target to make it easy and open to scale and extend your code easily and still keep your system close for modification.
Now it should come to design patterns where you should architect your components together, still it is based in your requirements where you can use Factory Method
for example in case you have one factory building multiple types of objects. Strategy
where you need to change the behavior at runtime based on user activaties, ..etc.
the answer even should be more longer than this however I tried to gave a glimpse where you should search and continue from here.