The hiring manager wants know if you’re dynamic enough to work both in a team and alone.
It’s a mistake to exaggerate one preference over the other. If your answer leans too heavily on working alone the hiring manager may become concerned that you won’t get along with your colleagues. Lean too heavily on teamwork and you may come across as too reliant on others to get things done.
Answer with balance, emphasise your adaptability to exercise both your interpersonal skills and discipline for solitary depending on the given task.
A good answer for a project manager position could be:
On my last project it was typical for me to write the project mandate document in isolation. However the draft document was peer reviewed by the wider team and myself.