Heavy pressure, writing the first post.
Is it accepting after the Dear agent, to jump straight into the query? XXX is a 20,000 word? Or does each query need a seque (e.g., We are looking for representation for ... or ... Because your MSWL consistently asks for “xxx, I think you may enjoy my latest project, which is xxx.)?
The question of query organization comes up a lot at The Work Conference, and what I've learned over the years is that very few agents care how you begin, so long as 1) the opening is intriguing and 2) the housekeeping (title/genre/audience/word count) appears somewhere in the query.
If you've got a great "X meets Y" comp ("My book is The Breakfast Club meets Alien"), it can be helpful to lead with that, since it clearly establishes expectations. The natural structure of an X-meets-Y would likely lead you to include housekeeping right up front. But let's say you're writing something with a super-catchy hook ("MC will be dead by midnight if she can't open the puzzle box her twin sister left behind when she disappeared without a trace nearly three years ago.") -- in that case, you can draw us in with narrative before housekeeping, and you're still accomplishing your goal.
Remember that the purpose of a query is to get agents excited about your enclosed pages. However that's best accomplished for YOUR story is the "right" answer (if there is such a thing).
Finally, I want to say that querying is tedious and difficult -- and you'll drive yourself bonkers trying to figure out if agents like housekeeping before or after a synopsis. Most don't care. Allocate your time and attention to better personalization and a crackerjack synopsis instead.