How to output tilde (~) directly

Get rid of the "US International PC" layout and instead use "US" or "ABC". You do this in system preferences > keyboard > input sources.

(US International PC is a special layout adopted from Windows which is intended to make it easy to write the accents needed in common European languages.)