First try vs second try for PhD Qualifying Exam
It depends on how common it is for people to fail. In my department, somewhere between a third and one half of people fail on first attempt (but will utimately pass it). They use the first attempt to get a feel for the level of preparedness, and may choose to take it in a semester when they have covered the basic classes, but maybe not the last one in the sequence yet.

If so many people fail, then there is no stigma attached to failing (and we don't consider it negatively either). I would ask how that looks in your department.