The Youtube example is using AnchorEntity(.plane(.horizontal, classification: .table, minimumBounds: [0.5, 0.5]))
Acc to Apple: (here)
If you don’t need a specific plane in your app and you’re rendering your app’s 3D content in RealityKit, you can use an AnchorEntity instead. This approach lets you attach 3D content to a plane without prompting the person for world-sensing permission and without any particular knowledge of where that plane is relative to the person.
You are getting the error because you may be using an AR session, which does not work yet in the simulator