When a team member is not pulling their weight on a group project or task, the honest, effective response is to address it directly and reasonably early, rather than either quietly resenting the situation while saying nothing, or simply absorbing their work yourself, since silent resentment tends to build steadily and rarely fixes the actual underlying problem on its own.
Have a private, specific, non-accusatory conversation about exactly what is not getting done and by when, rather than a vague general complaint about their effort, since there may genuinely be a real reason behind it, being overwhelmed elsewhere, unclear on what was actually expected of them, rather than simple laziness, and a calm, specific conversation is far more likely to surface and fix that than an accusation is. Clarify roles, tasks and deadlines explicitly and in writing going forward, so expectations are unambiguous for everyone involved, since a lot of underperformance on group work actually traces back to unclear expectations rather than genuine unwillingness to contribute.
If the issue continues despite a fair, direct conversation and clearly restated expectations, it is reasonable to involve a supervisor, professor or manager where that option exists, rather than letting it silently damage the whole teams output and morale indefinitely. Protect your own contribution and reputation by keeping some record of what you actually did, without becoming punitive, hostile or vindictive about it, since the goal throughout is a functioning team and a fair outcome, not simply winning a conflict.
Example: A student on a group project who noticed a teammate falling behind had a calm, private conversation about specifically what was not done and why, discovered the teammate was overwhelmed by an unrelated personal deadline, and together they redistributed tasks fairly, which resolved the issue without it escalating into resentment or conflict.
One practical tip: Address the issue directly and specifically, in private, early on, rather than staying silent or simply absorbing their work yourself, since a calm, specific conversation about exactly what is not getting done far more often resolves the problem than either silence or resentment ever does.