There is an awful lot you're doing wrong here.
First up: $$…$$ is not correct LaTeX markup. You should use \[…\] if you want display math and $…$ or \(…\) if you want inline math. I'm guessing that you really wanted in-line math for a lot of what you wrote. Not to mention that
$$3\sqrt{5}$$ $$means$$ $$3\cdot {\sqrt{5}}$$
will set three displayed equations with the middle one being
m e a n s
I'm guessing you really meant to write
$3\sqrt{5}$ $3\cdot {\sqrt{5}}$
Also, don't put blank lines before displayed math. Write:
Simplify that to
\[
\sqrt{45}
\]
instead of
Simplify that to
$$\sqrt{45}$$
(The line breaks in my version aren't essential, but it helps offset the displayed math in your .tex file for easier source readability.)
The \\ is going to put a blank line there. I'm not sure you wanted that.
And for the main question of the post, to get a centered block of text,¹ rather than use \centering you should use a center environment` instead which will indicate where the centered text should appear.²
\begin{center}
Take square root fo both expressions
\[
\sqrt{9}\cdot\sqrt{5}
\]
Simplify that to
\[
\sqrt{45}
\]
which is surds.
\end{center}
Although this should really be wrapped up in a new environment with some semantic meaning, but I'll let that slide for now.
It also adds some vertical space before and after which is probably appropriate for this case.
\begin{center} ... \end{center}rather than\centeringwhich centers the full remaining document. – Partha D. Aug 03 '21 at 13:53\begin{gather*}...\end{gather*}with\intertext{}for many of the short lines of text between the equations. By the way you should not use$$...$$, is better to use\[...\]see https://tex.stackexchange.com/a/69854/140456 – Luis Turcio Aug 03 '21 at 14:00