Is there a script for recreating the recovery partition, or at least carving out a fresh blank partition with the appropriate size and flags?

Yes, a guide is easy to find online and the process wouldn't take THAT long, but there's just something about having it automated to get it done just a little bit more quickly

I asked AI about this last night and it gave me a PowerShell script. I'm sure there's a lot to be said about blindly trusting AI output, especially for something as "big" as this, but on the other hand, I'm not really all that fluent in PowerShell