How to create a beautiful fire animation using Swift? Which API is better to use?
It sounds like starting with Reality Composer Pro and then loading the result in RealityKit will get you started.
For RCP check out Compose interactive 3D content in Reality Composer Pro. It doesn't show a fire animation but should provide enough detail for you to build or find one.
Once you've created the animation you can import it into an app and play it with RealityKit. See topics under Entity animations for details.