This is not possible with YAML frontmatter as those are just strings. They are not dates (except in your mind ).
If you want to search for dates, you need to use another option, e.g., custom metadata, e.g.,…
You are free to continue to use frontmatter in the document but it’s not going to be used for searches in the way you’re describing.