Cette [FAQ][1] propose 4 solutions.
\textasciitilde, \string~, \~{}, $\sim$
[1]: https://www.latex-fr.net/3_composition/texte/symboles/caracteres/caractere_tildehttps://faq.gutenberg-asso.fr/3_composition/texte/symboles/caracteres/caractere_tilde.html