Republicans are the House majority.
But the entire House votes on the Motion to Vacate.
McCarthy lost his post because Republican members of Congress didn't vote for him. After a Republican, Gaetz, decided to to take it to a vote.
Gaetz got only 7 other Republicans to vote with him.
He got all Democrats to vote with him. The motion would not have passed without the Democratic votes.
This isn't rocket science.
Indeed, it isn't. So why are you struggling so much with it?
The Republicans got rid of McCarthy for their own reasons. Pretending that it was because Democrats is painfully stupid.
Only 8 Republicans voted to vacate. It is inaccurate to say that "the Republicans" voted to get rid of McCarthy. A small minority of Republicans did. The overall majority was formed because the Democrats joined and supported Gaetz. So, yes, it was because of Democrats. To insist on the contrary position ignoring all evidence is what's painfully stupid.