Hello, this is Emily.
What you need is the US English International keyboard layout. You can add that in Settings > Time & Language > Language & Region. Click on the three dots of English (US) > Language options.
On the next page, scroll down. Add a keyboard and choose "United States - Interntional".
Then you can switch to this input method from taskbar, and use this keyboard layout list to guide your typing.
á = ‘ + a
é = ‘ + e
í = ‘ + i
ó = ‘ + o
ú = ‘ + u
ñ = ~ + n
ü = ” + u
¡ = Alt (hold down) + !
¿ = Alt (hold down) + ?
Note: The alt + number code only works when you have dedicated number pad.