Chains on e-bikes wear quickly, and unfortunately cassettes often do as well.
In your case, it sounds likely that the shop didn’t adjust the gears properly, which isn’t good. That said, you may also genuinely need a new derailleur and the hanger may need to be checked or aligned.
A bike shop...