A sequence $a_1, a_2, \ldots$ satisfies $a_1 = \dfrac 52$ and $a_{n + 1} = {a_n}^2 - 2$ for all $n \ge 1.$ Let $M$ be the integer which is closest to $a_{2023}.$ The last digit of $M$ equals
$$
\mathrm a. ~ 0\qquad \mathrm b.~2\qquad \mathrm c. ~4 \qquad \mathrm d. ~6 \qquad \mathrm e. ~8
$$
1. We start with the given sequence \(a_1, a_2, \ldots\) defined by \(a_1 = \frac{5}{2}\) and \(a_{n+1} = a_n^2 - 2\) for all \(n \geq 1\).

2. We observe that the sequence can be transformed using the substitution \(a_n = u_n + \frac{1}{u_n}\). This substitution simplifies the recurrence relation. Let's verify this:
   \[
   a_{n+1} = a_n^2 - 2 = \left(u_n + \frac{1}{u_n}\right)^2 - 2
   \]
   \[
   a_{n+1} = u_n^2 + 2 + \frac{1}{u_n^2} - 2 = u_n^2 + \frac{1}{u_n^2}
   \]
   This shows that if \(a_n = u_n + \frac{1}{u_n}\), then \(a_{n+1} = u_n^2 + \frac{1}{u_n^2}\).

3. Given \(a_1 = \frac{5}{2}\), we can find \(u_1\) such that:
   \[
   u_1 + \frac{1}{u_1} = \frac{5}{2}
   \]
   Solving this quadratic equation:
   \[
   2u_1^2 - 5u_1 + 2 = 0
   \]
   Using the quadratic formula \(u_1 = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\):
   \[
   u_1 = \frac{5 \pm \sqrt{25 - 16}}{4} = \frac{5 \pm 3}{4}
   \]
   \[
   u_1 = 2 \quad \text{or} \quad u_1 = \frac{1}{2}
   \]
   We choose \(u_1 = 2\) (since it simplifies the calculations).

4. Now, we have \(u_1 = 2\) and the recurrence relation \(u_{n+1} = u_n^2\). Therefore:
   \[
   u_2 = u_1^2 = 2^2 = 4
   \]
   \[
   u_3 = u_2^2 = 4^2 = 16
   \]
   \[
   u_4 = u_3^2 = 16^2 = 256
   \]
   Continuing this pattern, we see that \(u_n = 2^{2^{n-1}}\).

5. For \(a_{2023}\), we have:
   \[
   u_{2023} = 2^{2^{2022}}
   \]
   \[
   a_{2023} = u_{2023} + \frac{1}{u_{2023}} = 2^{2^{2022}} + 2^{-2^{2022}}
   \]
   Since \(2^{-2^{2022}}\) is extremely small, \(a_{2023}\) is very close to \(2^{2^{2022}}\).

6. Let \(M\) be the integer closest to \(a_{2023}\). Thus, \(M \approx 2^{2^{2022}}\).

7. To find the last digit of \(M\), we need to determine the last digit of \(2^{2^{2022}}\). The last digit of powers of 2 cycles every 4:
   \[
   2^1 \equiv 2 \pmod{10}
   \]
   \[
   2^2 \equiv 4 \pmod{10}
   \]
   \[
   2^3 \equiv 8 \pmod{10}
   \]
   \[
   2^4 \equiv 6 \pmod{10}
   \]
   \[
   2^5 \equiv 2 \pmod{10}
   \]
   and so on.

8. Since \(2^{2022} \equiv 2 \pmod{4}\) (because \(2022 \mod 4 = 2\)), we have:
   \[
   2^{2^{2022}} \equiv 2^2 \equiv 4 \pmod{10}
   \]

The final answer is \(\boxed{4}\)