You can load the Terraform modules from any place that you can get it where you execute the Terraform command. I see you use the Azure Repos and you want to execute the Terraform in the Pipeline. So you can use the relative path to load the modules. For example, your folder structure like this:

And you create the VM module in the VM folder and network in the network folder. And then you want to load the modules in the terraform folder within the main.tf
file, then you can add code in the main.tf
file like this:
module "vm" {
source = "modules/vm"
...
}
module "network" {
source = "modules.network"
...
}
It will load the modules from the path you set for the source. If you have any more questions, please give me the messages to let me know. I'm glad to give you a favor.