yaml files in jenkins pipeline
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).