Choosing a lock for an e-bike usually comes down to where you park, how long you leave the bike, and how much weight you are willing to carry.
U-locks are the common choice for higher-risk parking because the rigid shackle is harder to cut quickly than a thin cable, but the internal space limits what you can lock to and may not fit around large racks or fat frames. Folding locks are easier to carry on the frame and reach around more objects, though the joints and links should be checked for thickness and rating. Cable locks are light and flexible for quick stops or securing a wheel, but on their own they offer much less resistance to cutting, so many riders use them only as a secondary lock.
Whichever type you choose, lock the frame (not just the wheel) to a fixed object, keep the lock off the ground where possible, and remove the battery and display if they are detachable when parking in public. It also helps to check the lock mount, key type and whether replacement keys are available before you buy.
If you want to compare how a compact U-lock and cable combination is listed, this page shows the specs to look for: https://nook-nest-finds.netlify.app/products/kryptonite-evolution-mini-7-bike-u-lock-with-cable
Disclosure: I run EBike Elite, an e-bike finds site that researches and lists e-bikes available on Amazon.