You might want to distinguish between "attachment" and "craving" -- Why do the Noble Truths talk about 'craving', instead of about 'attachment'? -- it's more specifically "craving" that is deprecated.
Then Buddhism distinguishes "craving" (tanha) from "desire" (chanda) -- and "desire" might be for a wholesome or an unwholesome object.
How do I work without attaching to it ?
Maybe it's a practice.
My mum commented how patient I am when I help with her computer (i.e. she explicitly compared my demeanour with hers, saying that she gets upset and helpless if ever it doesn't work, whereas I don't, I just try to find a work-around for the problem). Now I'd slightly prefer not to do it at all, but I do because I think it's virtuous (to help her). And I'm not especially happy when it works as expected, and I'm not especially upset when it (temporarily) doesn't immediately work as intended/expected/predicted. So I'm working with the computer "as it actually is" and not only "how I want it to be" -- IMO I'm not too attached to its behaving as I hope it might. This is a result of decades of practising as a professional programmer, I know that getting upset with a computer isn't skilful, nor pleasant.
One of the Zen stories, No Attachment to Dust, includes the line, "Live with cause and leave results to the great law of the universe."
When I work with a computer I more or less understand or guess at the cause[s] of its behaviours.
So my work with her computer is a bit unattached, for example, in my opinion -- and it (working with it) doesn't really make me suffer, I don't think. I can remember when I started to program that I used to be surprised/unhappy if something I wrote didn't have the right effect, maybe that's something about being more attached as a novice -- or there being more of a gap between the computer on the desk and the model of the computer in my head -- with that "gap" then acting like a "craving" (for the computer to be other than as it is).
The bigger attachment in this story is something like, "I want to be the sort of person who helps their mother" -- that attachment can be a cause of suffering (e.g. "I wish I could help her more", or, "I don't want to do this other thing she asked"), but having done something like that for her that's not an action I regret, there's no remorse.
That's kind of where I am at the moment -- look at actions and habits (intentions) and wonder whether I regret that and feel remorse about it, like a bad habit, or whether it was a good thing to be doing or to have done, possibly an action that was intended (even regardless of its outcome) to benefit self and others.
You might like to read something like the book, The Buddha's Teachings on Prosperity, I think that the suttas are by and for monks and slanted towards the life of a monk, and I'm not saying that's a bad thing, but it isn't obvious how to apply that to life as a layperson. This book identifies and summarises from the suttas intended for lay people.