This message is saying that you should only have
provider "azurerm" blocks in your root module, not in either of your shared child modules. The shared modules will inherit the Azure provider configuration automatically from the root.
If you already have a suitable
provider "azurerm" block in your root module then you could just delete the redundant configuration blocks from the modules. If you don’t already have a configuration at the root you should move one of the blocks you already have into the root module and delete the other one.
provider blocks in shared modules are a legacy mechanism that is still supported only for compatibility with Terraform v0.10 and earlier. There’s more detail on the interaction between provider configurations and modules in the documentation section Providers Within Modules.