Infrastructure as Code (IaC ) is a fundamental principle of DevOps and the idea is to treat infrastructure the same way developers treat code.
Terraform defines the desired state into IaC and your code becomes the source of truth.
It allows virtual machines to be managed programmatically, eliminating the need for the manual configuration of, and updates to, individual pieces of hardware. This makes infrastructure highly "elastic,” i.e. repeatable and scalable, which would result in a faster and simpler process, saving costs and reducing any risks.