You can put $t = \sin x$, $-1 \leqslant t \leqslant 1$. Then $\cos x = \sqrt{1-t^2}$ or $\cos x = -\sqrt{1-t^2}$

 NMaximize[{t^2024 + Sqrt[1 - t^2]^2025, -1 <= t <= 1}, t]

>{1., {t -> 7.707*10^-321}}

 NMaximize[{t^2024 - Sqrt[1 - t^2]^2025, -1 <= t <= 1}, t]

>{1., {t -> -1.}}