the best way to accomplish this is by creating a specialized image from one of your configured VMs. You can then store it in the Azure Compute Gallery and use it as the source for your VM scale set.
This approach ensures that all machines in the VMSS have the same image and configuration, aligning with Azure best practices.
I would strongly recommend you to take a closer look at following Azure documentation:
Create an image of a VM - https://learn.microsoft.com/en-us/azure/virtual-machines/capture-image-portal
Store or share images - https://learn.microsoft.com/en-us/azure/virtual-machines/shared-image-galleries?tabs=vmsource%2Cazure-cli
Create and use a custom image - https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/tutorial-use-custom-image-powershell