YAML is a data serialization language commonly used to create configuration files. YAML stands for yet another markup language or YAML ain’t markup language (a recursive acronym), depending on who you ask. It underlines that YAML is for data, not documents.
Because it is human-readable and simple to understand, YAML is a popular computer language. It’s also possible to utilize it in combination with other programming languages.
Most of configuration files can be written in YAML rather than JSON because YAML is more readable and user-friendly. One advantage of utilizing YAML is that it can be incorporated to source control systems like Github, allowing changes to be recorded and audited.
Reference: https://www.redhat.com/en/topics/automation/what-is-yaml