I wasn’t able to figure out how to do this in Scriptable. Currently I’m achieving this by using Homebridge with the homebridge-wol plugin. This basically puts a button in the Home app that allows me to turn on my PC. (You can also setup a script for turning off, but I prefer to make it harder to do this and do it manually). As it uses HomeKit you can also use Siri to turn on your PC.
An alternative is to use an online service that allows you to send WOL packages, although that involves providing your public IP, MAC address, Port etc to a third party service. If you are comfortable with that someone has created a Shortcut on Reddit that does this. It uses the following website for sending the WOL packets behind the scenes:
https://www.depicus.com/wake-on-lan/woli
Personally, I’m waiting for Ole Zorn to release his update to Pythonista, which he mentioned on Twitter would include Shortcuts support. I’m hoping to be able to replace my current setup with this as I currently have WOL working in Pythonista - just without the Siri & background Shortcuts support.