Yup! There’s definitely a lot more than that.
I’d say design patterns play a heavy role in making codebases much more maintainable. There are also SOLID principles & Clean Architecture.
I’d highly recommend watching ArjanCodes videos in this aspect.
He’s a rare gem who discusses the topic of design patterns (in Python) and does a fantastic job talking about it with examples!