PreviewProvider protocol is available from iOS 13 only. If you select the running target of your project to any simulator which is below iOS 13 the previews won't work. Just select anything iOS13 or above, pause and resume preview and it will work.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: