I use BetterTouchTool. Being able to assign functions to the keyboard is not BTT's main task, but it is a nice bonus I take advantage of.
BTT's primary job is to give your a gazillion ways to customize your trackpad and mouse. But it can also create hotkeys and assign functions to your function keys, snap windows similar to what Windows does, assign functions on your TouchBar (if you have one).
But if you want more sophisticated key customization, then rccharles Keyboard Maestro may be the way to go.
You can do some things with System Preferences -> Keyboard -> Shortcuts to assign a hotkey combo or f-key to an applications menu entry including changing existing menu hotkeys. NOTE: if you go this way, when you enter a menu into the keyboard shortcuts, if it has … in the menu name, that is an ellipse (option-semi-colon) and not 3 periods. For example, I often use System Preferences -> Keyboard -> Shortcuts to remap Command-Q for my web browser to Command-Option-Control-Q so that I do not accidentally hit Command-Q when I wanted to hit Command-W.
More sophisticated mapping can be down, but it is a bit complicated, sometimes involving creating a "Service" with Automator and assigning that a key. Personally, a 3rd party utility is a better approach.