Unreal has a replay system ready to use. I haven’t used it but you can check the documentation for more details: