Robotnik throws the spike ball at a fixed arc towards you.
It's just a matter of positioning. Try to stay on the right side of the screen to have it bounce in a predictable way and be able to walk under it and avoid it easily.
ok UwU