Start by copying the video below, here i create a new input action, then setup its default key binds and the name of the action that will display in the controls menu, for the second key bind make sure in the name text box you include the _Secondary at the end of the name like I do in the video.
Next copy the video below, this will setup the default key binds that will be used when the player resets their key binds from the controls menu, it also shows you how you can add the new input event to the character blueprint to run you code.
For more information on unreals enhanced input system you go to Epics documentation on it here.
https://dev.epicgames.com/documentation/en-us/unreal-engine/enhanced-input-in-unreal-engine