With YAML, indentation and spacing are vital to the interpreter to know what the context is.
In this case you need to indent the entity_id: and the below: key. check in the docs to see this.
The Best way I know of to learn HA YAML is to build some automations and scripts with the UI editor, then look at the ‘edit as YAML’ button to see what it created. Also looking at peoples blueprints will give you lots of tips and tricks.