In order to write you need something to write about. Without the meat of an idea to build up and develop into a finished piece you've got nothing.
My method for getting ideas is simple: I pay attention to and interact with the world around me.
Creativity is a constant process of noticing and connecting things from your environment and spinning it out changed into something else that's yours. Every idea we have comes from somewhere. You can't draw water from a dry well, get blood from a stone, make bricks without straw, pick whatever idiom you like. It all boils down to the same thing: None of us create in a vacuum. There has to be a collecting stage where you observe and gather information from your surroundings to use as the raw material and inspiration for your own ideas.
My process of collecting raw idea-stuff has two equally important and complimentary parts: A constant state of curiosity and active effort to find new things. The first keeps my brain ready to grab and hold ideas and the second makes sure I'm exposed to plenty of them.
Curiosity
The constant state of curiosity is actually a tripart combo of attention, curiosity, and whimsy. I make a point to notice what's around me as I go through the day and pick up on whatever there is to see, even the tiny mundane details. If I see a nice patch of moss or sapling growing in a crack in the sidewalk or on a roof, I note it. When I go in a building I pay attention to the architectural details and floorplan. If I see an interesting sign, unusually-colored car, art, statue, nice tree, cool fungus, weird cloud, trash, roadkill, anything no matter how seemingly inconsequential I take a moment to squirrel the memory away for later. The same goes for the random ephemeral events I witness. An overheard conversation, a happy dog going for a walk, kids doing inscrutable kid things in public, animals interacting with each other or man-made objects, it all gets noticed. Anything can be a source of inspiration as long as I can remember it, I just have to pay attention and gather what's around me.
I also make a point to think about what I've seen. Be curious, ask questions, and follow the thoughts down whatever paths they take no matter how weird or goofy. Asking questions without reservation is the key to developing new ideas. I don't just grab the idea fragments I've collected and lock them away in a brain-vault to rot until the day I might need them. I take them out and turn them over, examining them and considering how they could work or change or go together. Creativity is about adapting, transforming, and juxtaposing concepts, not just collecting and regurgitating them as-is. I want to make something that's mine, and that means thinking and using my imagination. It's fun!
My most useful question is "what if?" It's so easy to get an entire host of ideas spun out from a single what-if. From small changes like "what if digital technology hadn't replaced analog" or "what if [mythical thing] was real" to more significant changes like "what if [law of physics] worked differently" or "what if [basic feature of life] didn't exist". It's an excellent brain-stretching exercise and a goldmine of ideas for fantasy and speculative material. I also get a lot of use out of "how?" and "why?" If I'm out and see an item sitting abandoned or lost/left I'll stop and think about how it might've gotten there or why it was discarded. (Obvious answer: It's a juvenile mimic, don't touch it.) The other basic questions (what, where, when, and who) follow to fill in the details, but why and how are what usually get the process going because they're more concrete and immediate to me.
And the final part that supports and enables the others is a carefully cultivated sense of whimsy. Not a childish, naive, twee aesthetic but a firehose sense of wonder paired with a distinct lack of self-consciousness. As a writer my job is to come up with things that are interesting, fun, and weird. Doing that requires a willingness to be weird myself. To play with ideas, look at things in heterodox ways, lean into nonsense, and have the mental flexibility to string random often unrelated details together into inspiring ideas without automatically dismissing the silly or outright dumb steps I run through along the way. There's a time and place for dignity and it's not when you're trying to create. If I was too self-conscious to let myself experience wonder, play, and generally goof around I wouldn't be able to write like I do. I'd still write, but without the ability to take something and make it weird it wouldn't be the same. All my attention and curiosity is worth absolutely nothing without the whimsy to back and power it.
Being Active
The equally important counterpart of curiosity is doing things. I don't really enjoy doing nothing. Just vegging out isn't relaxing to me at all and I've never been able to take naps (I just end up actually sleeping). So I'm usually doing something. From the time I wake up to when I grudgingly go to sleep I'm almost continuously engaged in one activity or another. Not for productivity's sake but because doing things is fun. And a happy side effect of being in motion all the time is that the things I enjoy doing either generate a ton of ideas on their own or give me time to think. It's why I always carry a notebook and pen with me, because while I might not be actively seeking ideas in the moment they still show up and when they do I want to be able to corral and record them.
The main things that help me get ideas are:
1 Going out. Getting out of the house to visit museums, parks, libraries, and other places beyond normal work and errands. Paying attention and being curious about the world around me is important, but if there's nothing new to pay attention to then it's not worth much no matter how observant I am. Going places and seeing things other than the inside of my house is vital for my creativity and mental health.
2 Talking with people. I like to shoot the shit. Whether it's a specific topic or just general conversation about nothing in particular, chatting is fun. I don't go into conversations specifically angling to get ideas, but they show up. More often than not just getting a different perspective or a random offhand comment will spark an idea or inspire me to connect things in a new way that leads to something cool. A lot of times I'll share those ideas and give them to whoever I'm talking with because they're more fitting for/directly related to what they're working on, but just as many stay with me.
3 Reading. I read a lot. It's easily the main way I consume media. I read every day and even then it feels like I should be reading more. I also read widely. Whatever I can get my hands on, if it sounds interesting I'll read it. (I may not finish it because life is too short to waste spite-reading a work you're not enjoying, but I'll at least give it a try.) My taste in fiction runs to the speculative and unreal: Sci-fi, fantasy, horror, weird fiction, westerns, folklore, and mythology. I'm sure that doesn't surprise anyone. I tend to avoid stories in mundane modern settings, but I'm not entirely opposed to them. Still I'll usually only pick up realistic stories on a very strong recommendation from someone instead of seeking them out myself. My non-fiction reading covers everything though. That's not an "I listen to all kinds of music"-type over-generalization either. The world is fascinating and I love learning about it, so if you put info in front of me I'll sink my teeth in. My main areas of interest are the natural world, science, and art (again, not surprising), but everything's interconnected so I'll regularly end up wandering into adjacent topics while pursuing others. I can kill hours tearing through wikipedia for fun, grabbing the cursory-level info as mental popcorn and marking subjects I want to dig deeper into with better sources later. It definitely beats doomscrolling as a way to spend time.
For the actual experience of reading I prefer audiobooks for fiction, physical books for non-fiction, and try to avoid screens unless that's the original or only way to get the info (ex: blogs, websites, vintage creepypasta, scholarly papers/articles that it's not feasible to print, etc.). I love books as artifacts, but the innards are what's really important, not the form factor.
4 Other media. As much a I love words they're not the only (or sometimes even best) vehicle for communicating ideas. It's important to experience and absorb mediums beyond the written word because they're good and worthwhile and because they land in the brain differently than text. It sounds obvious but the way we interact with sound and images is different from how we parse words. It uses other sections of the brain and makes me think about what I'm experiencing from another angle than when I'm reading.
My consumption of non-written media is still much lower than written. I don't watch movies very often (usually only when someone else organizes it) and my exposure to current TV is basically nonexistent. I don't really play videogames anymore. I also can't really do large gatherings, so live theater is out. I do like watching things and playing games. When I get the chance to it's always fun, I just don't have enough free time to engage with that type of media regularly. (I'm also spared from really crap media because my friends essentially curate what we watch/play and have excellent taste.)
What I do draw from often is music, album covers, art, and images in general no matter how refined or banal. (Plenty of people would think digging through scans of old survey maps, scientific journals, historical blueprints, and government photo archives is boring but I think it's fascinating.) Cartoons from all eras and comics, the whole swath of the medium from things like The Far Side to mainstream serialized books to indie productions. (I can't begin to describe how much of my sense of humor was shaped by The Far Side growing up.) There's always something that can spark an idea no matter how basic, all of it has potential.
The goal (beyond just doing things I enjoy) is to get a wide variety of experiences and thoughts/concepts/ideas in my head. Like I said at the start, creativity is taking what you know and connecting it in new ways. Everything I see, do, and learn builds up as background knowledge to reference and pick through for inspiration. The more I know, the more I have available in my head to draw from later.
It's like a collection of legos where the number of bricks and variety of different types/shapes/colors you have in the bin determines and limits what you can build. A larger collection has more options, so I collect and try to keep a continuous stream of new things coming so I don't get stagnant.