It would depend on the specific laptop and battery, usually. Some but not all manufacturers make external chargers. Otherwise you might have to try to replace the laptop charging parts, or find another laptop that uses the same battery (but maybe has a broken screen or whatever, for cheap).
There's also third party adapters, like https://www.direct-charging.com/en-us/collections/external-l... (never used them, not a recommendation, just a google search)