Can you type a tilde on the key under Esc on a European ISO keyboard set to US?
Having tilde next to the left shift is normal for Apple ISO (European) English keyboards.  If you want to put it somewhere else, you will have to use an app like Karabiner or Ukelele to customize the layout.

If using an external keyboard is acceptable, you could try to get an ANSI (US) keyboard (with no key between z and shift) someplace.  It will have the tilde below ESC.

Do not use the layout called "US International PC", since it treats tilde as a dead key for making accented characters, and requires extra steps to create an ASCII tilde.

Here is a custom US layout that should put tilde under escape.