this combo worked for in me in xcode 15:
1: add the following to the bottom:
#Preview {
ContentView()
}
2: hit cmd-opt-enter
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: