I think an ideal writing space matters, but that doesn’t mean you always have to write in the same physical location. Or that you’re always writing in ideal circumstances. That’s why there’s so much revision involved in the writing process. I’ve jotted down notes on my phone in a line (coded, usually, in case someone is looking over my shoulder), and used part of my lunch break to get down the important parts of a scene. Not ideal, but getting down the most important parts helps me when I do get back to my space.
For me, my ideal place is anywhere I can have my back to the wall and a bit of background noise. It can’t be music or tv (not unless I’m trying to write a specific mood), and definitely can’t be people taking. Just some general noise. Basically it helps me know where everyone is and that no one is looking over my shoulder reading/judging. Sometimes that means I write in a notebook on my bed. Sometimes that means I’m on the couch with my laptop. I used to be able to write in the library, but I haven’t been there since COVID.
So wherever you’re comfortable and productive is your ideal space.