Loading config items dynamically with YAML?

I would like to store some config items (headings for UI tabs) and
load them dynamically at runtime. I thought about storing them in YAML
files. But I’m not sure how to load and parse the YAML efficeintly?

The YAML file would include partials that would be used for the
heading.

Is there a better way outside of YAML files?

Thanks,
Chirag