For composing Swift Playgrounds on Mac with Xcode, you should use the "Swift Playgrounds Author Templates" from this page:
Apple Developer Documentation
Q & A
- Where do I add my files to if I've been working on my app somewhere else?
- How do I use scenes/objects from Reality Composer?