If you are looking to remove your cassette or freewheel you first need to know what you have on your eBike! You can watch the attached video to aid in determining the type but there are also a few other rules of thumb that can be helpful.
Most Mid-Drive eBikes have a Cassette on them
Most Rear-Hub Motor eBikes have a Freewheel on them
"Video Courtesy Park Tool on Youtube.com"