Hi,
Yes, you can use Custom data or User data with VM Scale Sets. To "edit" it you need to replace the existing Custom/User data with new version.
For example, you may navigate to your VMSS in the portal and click Settings -- Operating system blade. In screenshot below you can see I'm setting Custom data to a Bash script, which cloud-init will run when VM instance is provisioned:
Please click Accept Answer and upvote if the above was helpful.
Thanks.
-TP