In Windows 10, what is the best way to attribute the character ß to AltGr+S key combination?

My keyboard is not German but as I'm writing some German texts, I would like to be able to write the character ß with that key combination. Is it possible? How can I do it?


1. Windows Language Preferences

Windows allows you to add extra keyboard layouts. You can type Add a language to this device into the Start search. Once you have another keyboard layout installed, you can swap between them with Alt+Shift.

2. AutoHotkey

AutoHotkey allows you to redefine any set of keystrokes to perform any action you want. Text replacement is the simplest example of what you can do with it. A working script should look like:

<^>!s:*:ß

Where <^> stands for the AltGr modifier, and :*: denotes replacement (will not leave behind an s).