The answer is $2022^{2}+1$.
First, let's show that $2022^{2}$ is indeed insufficient. For this, we divide a $2022 \times 2022$ sub-board into $2 \times 2$ boards. In each such board, we can place four beetles such that they walk in a small circle (square) clockwise.

Now, suppose we have more than $2022^{2}$ beetles. We want to prove that at some point, two will end up in the same square. To this end, we number the squares from $(1,1)$ to $(2023,2023)$ and color the board as follows: the squares in an odd row and odd column are colored $A$, an odd row and even column are colored $B$, an even row and even column are colored $C$, and an even row and odd column are colored $D$. Thus, half of the diagonals are colored with $A$ and $C$, and the other half with $B$ and $D$. Therefore, there are $1012^{2}$ squares $A$, there are $1011^{2}$ squares $C$, and there are $1011 \cdot 1012$ squares of both $B$ and $D$.

Then each beetle follows a cyclic path $A \rightarrow B \rightarrow C \rightarrow D \rightarrow A$ or $A \rightarrow D \rightarrow C \rightarrow B \rightarrow A$. We note that no more than $1011^{2}$ beetles can start in squares $C$, as there are only $1011^{2}$ of them. Since the number of beetles is greater than $2022^{2}$, there must be more than $1011^{2}$ beetles on squares $A$ or more than $2 \cdot 1011^{2}$ beetles on squares $B$ and $D$ together.

In the first case, after two minutes, there are more than $1011^{2}$ beetles in squares $C$, and we conclude that two beetles meet.

In the second case, after the first minute, there are more than $2 \cdot 1011^{2}$ beetles in the squares $A$ and $C$ together. Thus, two beetles meet in $C$ or we find more than $1011^{2}$ beetles on squares $A$. In that case, after the third minute, there are more than $1011^{2}$ beetles in squares $C$, and we conclude that two beetles meet anyway.
On a $2023 \times 2023$ board, some squares contain a beetle, with at most one beetle per square. After one minute, each beetle moves one square to the left, right, up, or down. After each subsequent minute, each beetle moves one square further, but always makes a 90-degree turn. If a beetle moved left or right in one minute, it will move up or down in the next minute, and vice versa. What is the minimum number of beetles that must be on the board to ensure that at some point, two beetles will end up in the same square at the same time, regardless of where the beetles start and how they move (following the rules)?