To be really sure, it would help to put your YAML into a code block, using the </> key, or using 3 back tics “```” before and after the block, like this:
put your code
in a block
that preserves indentation
It might be invalid due to indentation, although I don’t see the required apiVersion key; a valid deployment will look something like this:
We cannot help you if you keep posting the YAML like that. Indentation is part of the syntax so losing the indentation makes it impossible to see where the error might be.