How to change key binding at runtime?

I’ve seen a thread on this but it made no sense. All I want to do is let the user select what controls they use for different actions. It looked like on the old thread, they were just having issues trying to figure it out- and there was mention of what they were doing being bugged.

I would like the game to be able to have an option menu that lets you do things like Jedi Knight; Jedi Academy.

On click of a button representing an action, tell user to select a key or mouse press, after that, the new input is bound to that input.

If you open up the Input System in the package manager, among the examples. there is a rebinding example which can be used as a starting point and examining how it is done.

Also if you search in any search engine, you will get a thousand examples, videos, written and all. Here is an example: