Building scalable software requires a software engineer/architect to pick the right architecture especially when building enterprise software/applications.
Monolithic architecture is usually the first choice in mind for most engineers because it is easy and does not have to deal with the distributed system complexity because a whole application is in the same giant codebase when dealing with agile software delivery; monolith application might not be the right choice because when making small code change requires us to deploy a whole application which could be time-consuming, the other thing is that we cannot even scale individual components/services.
If there’s an error in any module/feature/service, it could affect the entire application’s availability and that is the reason why Microservice Architecture comes to the rescue.