Why do the two methods give different answers for the Fourier transform of $Y = \cos(\omega_0 t + \phi)$? Why do the following two methods give different answers (or are they the same) for the Fourier transform of $Y = \cos(\omega_0 t + \phi)$, with respect to $t \to \omega$ ?
They are the same.

Using the Dirac impulse sifting property $f(x) \delta(x-a) = f(a)\delta(x-a)$ you can also verify that the second method produces the same output as the first method.