I can only reccomend SO cord and a plug if the toaster is often moved around.
If that is the case, you will want to upgrade to 8/3 SO. You'll also want to use a 40 amp connector into a receptacle that is rated to disconnect under load- most of your NEMA-pattern receptacles are not. Look into such things that are marketed for motors.

It is more likely that the toaster doesn't move around very much. It would be more common that it would be wired to a disconnect switch using a metal-lined liquid-tight flex, containing #8 wires.

One exception: it is permitted to use whatever type of cord & plug that the unit came with when manufactured. I suggest looking at the makers' web site to see if there are any reccomendations.