[guided]We want to control the number of short cycles (cycles of length less than $g$). Once we control them in expectation and then by Markov in probability, the deletion argument in the last step will remove them.
Define $X_i$ to be the number of cycles of length $i$ in $G$, for each $i \in \{3, \ldots, g-1\}$ — we need $i \geq 3$ since cycles have length $\geq 3$, and we only care about cycles below the target girth $g$. Set $X := X_3 + \cdots + X_{g-1}$, the total number of short cycles.
To estimate $\mathbb{E}[X_i]$, we first count cycles. A cycle of length $i$ on labelled vertices $[n]$ can be specified by an ordered sequence $(v_1, \ldots, v_i)$ of distinct vertices, interpreted as the cyclic sequence $v_1 \to v_2 \to \cdots \to v_i \to v_1$. However, each cycle corresponds to $2i$ such sequences: $i$ rotations (starting from any of the $i$ vertices) $\times$ $2$ directions (forward or backward). The number of ordered distinct-vertex sequences is $n(n-1) \cdots (n-i+1) \leq n^i$, so the number of cycles is at most $n^i/(2i) \leq n^i/i$.
Each cycle of length $i$ uses $i$ specific edges, and each edge is in $G$ independently with probability $p$, so a fixed cycle is contained in $G$ with probability $p^i$. By [linearity of expectation](/theorems/???),
\begin{align*}
\mathbb{E}[X_i] \leq \frac{n^i}{i} p^i = \frac{(np)^i}{i}.
\end{align*}
With $np = n^{1/g}$, each term is $n^{i/g}/i$. Summing for $i = 3, \ldots, g-1$ and bounding each summand by the largest, $n^{(g-1)/g}$:
\begin{align*}
\mathbb{E}[X] \leq \sum_{i=3}^{g-1} n^{i/g} \leq (g - 3) n^{(g-1)/g} =: c \cdot n^{(g-1)/g},
\end{align*}
where $c = g - 3$ depends only on $g$.
Now we apply [Markov](/theorems/???) with threshold $n/2$:
\begin{align*}
\mathbb{P}(X \geq n/2) \leq \frac{\mathbb{E}[X]}{n/2} \leq \frac{2c \cdot n^{(g-1)/g}}{n} = 2c \cdot n^{-1/g} \to 0 \quad \text{as } n \to \infty.
\end{align*}
The crucial point is that $(g-1)/g < 1$, so the expected number of short cycles is of order $n^{(g-1)/g} = o(n)$. Consequently, for all sufficiently large $n$ — say $n \geq N_1(g)$ with $2c \cdot N_1^{-1/g} \leq 1/2$ — we have $\mathbb{P}(X \geq n/2) \leq 1/2$.[/guided]