So I know that the problem is at
\setcounter{secnumdepth}{0}
But I don't know if there is a fix to this (without deleting this line, since I don't want numbered sections), since the link in ToC is fine. Basically the effect I want is to have a clickable link on one arbitrary word I write (just like the URL where the link is behind the text).
\documentclass[12pt]{article}
\usepackage{hyperref}
\title{Test}
\setcounter{secnumdepth}{0}
\begin{document}
\maketitle
\tableofcontents
\section{Test}\label{sec:test}
There should be a clickable link: \ref{sec:test}\\
But this works:
\autoref{sec:test}\\
And this also works:
\pageref{sec:test}\\
\end{document}