This should be one of the first apps installed on any new Mac. https://www.keyboardmaestro.com/main/