I'd say write what you know, but if I followed that advice I would have written books about why I like whiskey.
Kind of a niche audience for that one as opposed to mysteries and thrillers.
Of course, that can make things difficult. These days the big sellers are NF and YA. Well, I'm not good at telling the truth and I disliked growing-up so much that I can't even think of a fictitious account of it that would want me to revisit those feelings.
So I write mysteries. I like mysteries.
And I write thrillers. I like thrillers.
Though I'm not a fan of complete sentences. See what I did there?
If you really want to follow the market and try to write the book that will get an agent's head to turn just because that genre is hot at the time, good luck and more power to you.
Personally, if I don't really want to write something it turns into a forced, hackneyed rant.
Yes, I know I just gave you the underhand, slow pitch set up. I'm comfortable with that.
If you like romance or fantasy or whatever, just write that. Write about the things you find passion and humor and intrigue in.
Enjoy writing and it will show through on the pages.