In the canonical ensemble, system is at constant temperature which is the same as the reservoir with which it is in the thermal contact.
Since the system and the reservoir can exchange heat which therefore can change the internal energy of the system (internal energy of the system fluctuates), how is it possible that the temperature remains the same regardless of the internal energy of the system if both volume and number of particles in the canonical ensemble don't change?
As usual, I go back to good old Landau "Statistical Physics" (part one). I crib from his Section 28, entitled, the Gibbs Distribution.
A macroscopic system-of-interest is considered to be a small part of a larger closed system. The total energy of the closed system being constant $E_0 = E + E'$, where $E$ is the energy of the system of interest and $E'$ is the energy of the medium.
The system of interest has a differential number of states $dN$ and the medium has a differential number of states $dN'$.
The probability that our system is in some state $n$ with energy $E_n$ is:
$$
p_n \propto \int dN' \delta(E_n + E' - E_0)
$$
$$
=\int dE' \frac{dN'}{dE'}\delta(E_n + E' - E_0)\;. \qquad (1)
$$
But, "of course," we already know that the Entropy is related to the number of states like:
$$
\frac{dN'}{dE'} \propto e^{S'(E')}
$$
The integral in Eq. (1) is trivial, and we find:
$$
p_n\propto e^{S'(E_0-E_n)} \approx e^{S'(E_0) - \left.\frac{dS'}{dE'}\right|_{E_0}E_n}\;,
$$
where, we also realize that
$$
1/T = \frac{dS'}{dE'}\;,
$$
is the temperature of the total system, the medium, and the system of interest (since we are in thermal equilibrium).
So, we have:
$$
p_n \propto e^{-E_n/T}\;,
$$
which is the canonical distribution, A.K.A. the Gibbs distribution.
can change the internal energy of the system (internal energy of the system fluctuates)...
The internal energies of the system of interest are $E_n$ and do not "change." They are determined by classical or quantum mechanical calculations (e.g., the energy levels of a hydrogen atom). Energy can be exchanged from the system of interest and the medium, but the total energy $E_0$ is constant. Almost all the states of interest of any macroscopic system are within some small $\Delta E$ of the average energy $\bar E$. See Landau sections 1-7.