A Pell like equation If one takes in general $(\star)\, \,x^2-dy^2=C$ where $d$, $C$ in $\mathbb{N}$.
Taking $d=w^2p^2+p$ with $w\in \mathbb{Q}\ge 1$ and $p\in \mathbb{Z}$ which is verified (explained later), for the matrix $$A=\begin{pmatrix}2w^2p+1&2w(w^2p^2+p)\\2w&2w^2p+1\end{pmatrix}$$ if $X_0$ is a solution to $(\star)$ then $AX_0$ is another one.
Now $w$ could be taken in a cool way basicaly say $d=a^2b^2+cb$ with $c\in\mathbb{Z}$, $|c|<|a|$ and $c$ coprime with $b$ and $a$, letting
$w=\frac{a}{c}$ and $p=cb$ the matrix $A$ is in $\mathbb{Q}$ but can have a power $A^n$ with integer entries. So to say that i didn't find any reference for this idea which is surprising. This is related and known of course as a Pell equation when $w\in \mathbb{N}$.
A question is if there is a related topic discussion to this approach since Pell equations  are known, and as a conjecture to give certain family of $A$  with $A^n$ of integer entries. (It appears there are many). Thanks
Edit, i'll illustrate this in an example just for clarity:
$$x^2-2021y^2=d^2$$ one solution is $(d,0)$, i took $2021$ by chance as it is within what i can get, (i don't know if it should work for $2020$) since $2021=\frac{45^2}{4^2}4^2-4$. An easy argument says if the numerator of $w$ here $45$ is $5 \pmod{8}$ Then $A^3\in \mathbb{M}_2(\mathbb{Z})$ so
$$A=\begin{pmatrix}-1011.5&45472.5\\22.5&-1011.5\end{pmatrix}$$ and  $$A^3=\begin{pmatrix}-4.139590049\times 10^9&1.8609747948\times 10^{11}\\9.2081880\times 10^7&-4.139590049\times 10^9\end{pmatrix}.$$
Edit. It seems such $A$ has an all integer power $A^n$ if and only if $c$ is a power of two and mainly  $|c|= 1, 2, 4$,
 A: If I understand correctly, your question is the following: suppose that for a given positive integer $d$ the equation
$$\displaystyle x^2 - dy^2 = c \text{ } (\ast)$$
has a solution in integers $x,y$ for some integer $c$. Then does there exist an infinite family of solutions generated by $A^k (x,y)^T$ for some $A \in \text{GL}_2(\mathbb{Z})$ having infinite order?
The answer is yes, and was answered completely by Siegel. Indeed,  the equation $(\ast)$ has finitely many solutions modulo the action induced by the unit group of the ring of integers of $\mathbb{Q}(\sqrt{d})$, which always has rank one. See the following paper of Siegel: The average measure of quadratic forms with given determinant and signature.
A: Thought it possible to simplify in order to be able to write the solutions of the equation. For this we use the decomposition of the number $c$ on the multipliers.
$$Z^2-dR^2=c=ab$$
To record decisions have to know first the solution of the Pell equation $(Z_1;R_1)$. Although to find all the solutions-it is necessary to substitute all the solutions of this Pell equation.
And solving the following equation Pell $(k_0;n_0)$.
$$k^2-dn^2=1$$
Then the formula is as follows.
$$Z_2=k_0Z_1+dn_0R_1$$
$$R_2=n_0Z_1+k_0R_1$$
The problem in finding the first solution for General Pell equation $(Z_1;R_1)$.
The meaning of the solution is that to factor the number. $c=ab$
Then degradable factoring the difference.  $xy=a-b$
If the following expression may be a square.
$$s^2=\frac{1}{d}((\frac{y+x}{2})^2-a)$$
Then the first solution is written simply.
$$Z_1=ds^2+\frac{y^2-x^2}{4}$$
$$R_1=ys$$
Such record these formulas will greatly simplify the calculations. Always better to have a formula. It's not always true that it works... but it works.
You can also create other formulas...
https://artofproblemsolving.com/community/c3046h1049910___4
https://artofproblemsolving.com/community/c3046h1048219___2
I will give one example-which shows in which direction it is necessary to look for solutions.
Although it should be mentioned, and the equation: $$aX^2-qY^2=f$$
If the root of the whole: $\sqrt{\frac{f}{a-q}}$
Using equation Pell:  $p^2-aqs^2=1$  solutions can be written:
$$Y=(2aps\pm(p^2+aqs^2))\sqrt{\frac{f}{a-q}}$$
$$X=(2qps\pm(p^2+aqs^2))\sqrt{\frac{f}{a-q}}$$
And for that decision have to find double formula.
$$Y_2=Y+2as(qsY-pX)$$
$$X_2=X+2p(qsY-pX)$$
The interesting thing here is that each solution of the Pell equation determines itself the next formula for solutions of the Pell equation. And there are a lot of different special cases for which it is very easy to find solutions.
