Line 70 may benefit from adding "--accept-source-agreements --accept-package-agreements" to the command line.
Currently the script gets stuck as it is waiting for user input to allow for the msstore source to be approved.
I've not done thorough testing to verify this completely solves the issue for all locales but does seem to work for the 2-letter geographic of "US" which winget reports is sent to the backend service in order to function.