Undergrad research with friends; one of them does nothing
It sounds like this question is about undergraduate research.

If an undergraduate student does not want to participate in research, that's fine.  They're welcome to have other priorities.  Other students have no responsibility to deal with a student who is not participating.

If a student is trying to get credit for participating in research but does not actually do anything, that is a matter for your professor to deal with.  They're responsible for setting standards.

If the students are not getting paid, there is no reason for the professor to push out a student who is not doing anything.