I thought it might be instructive to present an approach that relies on a set of elementary inequalities along with the squeeze theorem. To that end, we begin with a short primer.
PRIMER:
In THIS ANSWER, I showed using only the limit definition of the exponential function and Bernoulli's inequality that the logarithm function satisfies the inequalities
$$\bbox[5px,border:2px solid #C0A000]{\frac{x-1}{x}\le \log(x)\le x-1} \tag 1$$
for $x>0$.
And in THIS ANSWER, I developed the well-known inequalities often introduced in geometry
$$\bbox[5px,border:2px solid #C0A000]{\theta\cos(\theta)\le \sin(\theta)\le \theta}\tag 2$$
for $0\le \theta\le \pi/2$.
First, we write $\cos(x)=1-(1-\cos(x))= 1-2\sin^2(x/2)$. Then, using $(1)$ reveals
$$\frac{-2\sin^2(x/2)}{1-2\sin^2(x/2)}\le \log(\cos(x))\le -2\sin^2(x/2) \tag 3$$
Next, using $(2)$, we obtain
$$\frac{-(x^2/2)}{1-\sin^2(x/2)}\le \log(\cos(x))\le -x^2/2\cos^2(x/2) \tag 4$$
whereupon dividing $(4)$ by $x^2$ yields
$$-\frac12 \frac{1}{1-\sin^2(x/2)}\le \frac{\log(\cos(x))}{x^2}\le -\frac12 \cos^2(x/2)\tag 5$$
Finally, applying the squeeze theorem to $(5)$ yields
$$\bbox[5px,border:2px solid #C0A000]{\lim_{x\to 0}\frac{\log(\cos(x)}{x^2}=-\frac12}$$
And we are done!