Check the charging contacts first.
Yes, start by cleaning the charging contacts on both the robot and the dock. That’s the most common fix for a bot that only charges for a few minutes before stopping.
Dust, hair, and grime build up on those tiny metal strips. A dry cloth or a q-tip with a little rubbing alcohol usually does it. While you’re there, make sure the dock’s charging pins aren’t worn down or bent.
If the contacts are clean and it still quits, the battery is likely dying. Robot vacuum batteries last 2-3 years. Replacement is cheap and easy—way cheaper than a new machine. On some models, you can even use a third-party battery.
Don’t buy a new robot yet.