Just started out working on jenkins, among other things I'm trying to understand the role of yaml in pipelines. I understand that pipelines or declarative pipeline (do other type of pipelines exist in jenkins?) are defined using a syntax that is based on an extension of groovy and that yaml can be used along with some plugins or extended library to generate an on the fly groovy-based pipeline definition. Is my understanding correct?
The blog post you linked to in your comment which describes using YAML to generate Pipelines is about an unofficial 3rd-party Jenkins plugin which adds this feature; neither native Jenkins nor official plugins support using YAML to generate Pipelines.
pipelines or declarative pipeline (do other type of pipelines exist in jenkins?) are defined using a syntax that is based on an extension of groovy
There are two types of natively-supported Pipelines: Scripted Pipelines (which are pure Groovy scripts) and Declarative Pipelines (which use a Groovy-based DSL).
In most case in jenkins yaml is not used all command are written in grove, on the fly you can create some snippets using jenkins pipeline syntax generator in order to understand better check documantation https://www.jenkins.io/doc/book/pipeline/getting-started/#snippet-generator it is not like in you run one command like kubectl create deployment and whole manifest is defined also you can use blue ocean editor which is much better for creating pipeline. there are some implementation of yaml pipelines but they are not widely used check this posts