The thing that helped me the most to design maintainable systems was the use of Clean Architecture. In particular, the [Cosmic Python Book](https://www.cosmicpython.com/), which offers practical examples on how to implement Clean Architecture in Python, and which design patterns are more useful to keep every layer independent.