The best way to ensure cloud infrastructure configuration is backedup, is to deploy using infrastructure as code, the files will then be held in a source control system.
Where deployment has happened via other means, you can capture the configuration though selecting Export template
at the resource group level - although not 100% of resources will export cleanly.
What you can do to protect your resources from accidental deletion is to enable Resource Locks, and ensure RBAC is well configured to prevent high levels of standing access to many people.
To protect your Virtual Machines, you can leverage Azure Backup.