VM Agent based builds are an obsolete model. A docker/container-based pipeline is the current state of the art and allows for very fast builds with caching built in and isolated stages with narrow responsibilities.
[1] https://docs.microsoft.com/azure/devops/pipelines/process/co...
[2] https://docs.microsoft.com/azure/devops/pipelines/process/se...