How to derive the flow pattern in magic square problem? 
And my question is how the boy managed to derive the pattern of the sequence of number that summed to 265?
Check this link:   https://www.youtube.com/shorts/pYwMQEE-6NY


I don't know the exact formula the boy used in the video, but I can provide you with one of my own that I discovered that works for $\textbf{all numbers}$.
An observation is that the rows, columns and diagonals passing through the center number are symmetric to each other, at least when you compare the difference to the middle number of that row, column and diagonal. For example, taking the middle row, and letting the number in the center be $0$, we get the numbers, from left to right, $-9,-7,0,7,9$, for the 0 mod 5 case for example.
Another important observation is that the center number is the sum divided by $5$, that is, $\frac{265}{5}=53$.
If we take the center number to 0, as we know what the center number is, we can now base every other number around it. Filling it in like below:

This will give you numbers that are all unique, and satisfy the requirements in the video.
Proof:
When the center number is $0$, it is easily verified that all the columns, rows and diagonals are equal, and all numbers are unique. If we increase the center number by a value, say $\lambda$, we see that the uniqueness of the numbers are not affected by the increase. As the differences are not affected, each of the rows, columns and diagonals have the sum of $5\lambda+c$, with $c$ being the residue $mod$ $5$.
Therefore, as we vary $\lambda$, we can achieve the condition shown in the video for every $5\lambda+c$, or every residue mod 5.
