Remember always buy one that uses replaceable battery packs. Even better if you can just use a power tool battery. There are even adapters for certain brands of vacuums so you can put a power tool battery into the vacuum.
If the battery is not replaceable you have to trash the vacuum after a couple of years of use, since the battery won’t hold a charge. Replacing the li-on cells is not easy and requires a spot welder, you can’t just use a soldering iron.