@pratik It’s always the URL that needs to be shared into the shortcut, so on macOS you’d right-click on the URL in Safari’s address bar and select it from the Services menu after copying the quote. For hyperlinks, it often tries to share the text into the Service rather than the URL, so after right-clicking on one of those I choose Share → Shortcuts → Publish Quote and it works much better.
As for iOS, that’s more curious. It was working fine in my tests earlier, but now I’m running into my own issue. What app were you trying to share from there?