@pavelle A quick look at the 2017 post by @Jay S shows the workflow uses PHP, which Apple removed from macOS Monterey. You can read more about it here:
https://www.alfredapp.com/blog/releases/alfred-4-6-ready-for-macos-monterey/
Odds are reinstalling PHP via Homebrew will get you some of the way there, but the workflow doesn't appear to be maintained so if Wolfram Alpha itself has changed in the past 5 years, these changes won't be reflected in the workflow.
If you use node.js, there's another Wolfram workflow here:
https://www.npmjs.com/package/alfred-wolfram-alpha