Body doubling is usually the name given to a strategy to help people with ADHD and similar conditions be more productive. Those struggling with executive dysfunction might need help staying engaged. Seeing someone else get work done might act as a passive form of accountability. You are less likely to wander off to organise your sock drawer if you know someone else a) knows what you actually should be doing and b) is watching you.

Mirroring is a slightly different concept. When someone is mirroring, they’re closely observing and then matching the speech or movements of another person.
With body doubling, the individuals aren’t necessarily doing the same thing.

I don’t think this is true, necessarily? Mirroring doesn’t always involve intentionally studying and replicating movements.

See What is a body double? by How to ADHD