Last year a couple friends and I built a tool where you can record user input (controller, mouse, keyboard) and save it to a file for the purpose of playing it back.
Our intention for this tool was to capture play-testing and replay user's game sessions. Our thought was this tool would serve to re-create any bugs the player found during their testing.
It works for any Unity game that uses the standard Unity Input library, however it can be adapted to work with any sort of input system.
Instructions can be found at https://github.com/LetsBuildGG/UnityInputReplay