Yes, you can switch or cancel your Scottish Power energy supply at any time.
However, if you’re on a fixed-rate tariff and are switching or cancelling early, you’ll likely have to pay an exit fee. These may apply per fuel, so one for electricity and one for gas, but they’re not too expensive. This could still make cancelling or switching worthwhile.