Using templates in Markdown

I’m almost 100% certain I’m missing something major here, but how in the world do I use templates in a markdown file?

I can make a markdown file in content/ and view it, but no matter what I do the templates won’t actually do anything and are just rendered as plain text. For example:

title: "thermals"
date: 2022-11-01T20:37:07-07:00
draft: false

{{ add 1 2 }}

Markdown goes in content files.
Template code goes in template files (layouts directory).

Have a look at shortcodes: