(with a blank after “Created on:”), it would still be invalid YAML, since colons are special.
You probably want to try something like
Aliases: [""]
Created on: "{{date:YYYY-MM-DD}}-{{time:HH:mm:ss}}"
Tags:
Source:
See Also:
Comments:
(use a blank after Created on: and use apostropes (") around the date/time string part).
Since the above is Obsidian Template code (have you switched on Settings → Core plugins → Templates?), you can also just use a blank after “Created on:” and expand the template first.
It turns out that deleting the space between Create On: and first curly brace and then adding it back solved the problem and notes now do not prompt the invalid YAML comment. I wonder if some control character had somehow entered there. Whatever it was, it is resolved!