This is maybe more about being an artist in general, than specifically about writing, but I think intentionally trying to live an interesting life is very important.
Dave Chappelle talks about how the most valuable thing an artist has is their memories. You gotta go out and make some. It doesn't matter so much if they are yours or others, but what it does is it makes your work more human and grounded in human experience. Even if you write sci-fi or fantasy, it should be informed by your experience of what it means to be alive in this world.