You can switch from a fixed tariff at any point, however some suppliers carry an exit fee if you leave within the first or second year.
Before choosing to switch, check the end date on your tariff. You should find this on your energy bill, or alternatively you can contact your supplier.
Checking if you have any exit fees should determine whether it’s best to switch before or after your current tariff has ended. You’re entitled to request a switch 42 days before the end of your tariff. In this time you should start compare and switch to a new tariff to avoid being automatically rolled onto a standard tariff after your end date.