sudo xcode-select -s /Applications/Xcode.app xcrun /Applications/Xcode.app/Contents/Developer/usr/bin/safari-web-extension-converter /path/to/extension
manifest.json need to be version 2. Version 3 will cause error.
Then refer to this article: https://bartsolutions.github.io/2020/11/20/safari-extension/
Open the X-Code project of your Safari extension. Press “run” button. It should auto run your unpacked extension in Safari