Help, which of these scripts is best to restart the WAN

your first script is still incomplete. It needs to be
ifdown wan
sleep 5
ifup wan
(otherwise it would just disable "wan", but not restart it)

The 2 scripts would do the same, if modify the first script even more:
ifdown -a
sleep 5
ifup -a

(side note: the "sleep for 5 seconds" might be optional in your case)

"network restart" restarts all interfaces (wan, lan, bridge, loopback, all your wifi's). Also does ifdown/ifup with "-a".

In contrast the combo "ifdown wan; ifup wan" will just restart the wan interface.

So without questioning your reasons, the technical answer to your question is:
Technically both of your scripts will work, as both will restart "wan" (as long as you add the missing "ifup wan" to the end of the first script).
Restarting all interfaces is a bit slower and you will also notice a short downtime on the other interfaces compared to just restarting the "wan" interface.