Edit: Only now I've realized this question is specific to the amsart class.
The following looks exactly as I want it, i.e. the first "j" of "joweirj" starts where the first "l" of "llong" starts:
\documentclass[12pt,a4paper]{amsart}
\begin{document}
\tableofcontents
\section{llong asdofi jweoir weoi howet
oughsodfuh sodf hwoeir joweirj weorij woerij}
\end{document}
\appendix
\section{cat}
before \end{document}
then "j" of "jewoir" starts where the "c" of "cat" starts:
Question: How can I avoid it? I'd like to have an appendix item in toc as in the second picture, but in the first toc item the word joweirj should start where the word llong starts.
Edit: barbara below suggested to add \renewcommand{\sectionname}{}
after \appendix
, but the second line of the first toc item is still aligned with the word "cat". Also, I would rather have "Appendix A" instead of just "A".