Good advice, Jane Austen! You don't necessarily have to write only what you know, but it makes sense to write what interests you.
If you chase a trend or a tempting opportunity into a genre that doesn't excite you, odds are that what you write also will not excite you--or the reader or viewer.
Maybe that's why Austen wrote "Pride and Prejudice" and not "Pride and Prejudice and Zombies."
(If you'd like to learn to write from the best, get a copy of my very new book, "Your Creative Writing Masterclass." It features writing advice from more than 100 classic and modern writers, plus my guidance on how to apply that advice to you want to write. It's published by Nicholas Brealey and you can get it from Amazon or your other favorite book seller.)