making power harmonics analyser which will measure the amplitudes of the fundamental and its multiples (like 50hz, 100hz, 150hz,200 hz,...) there are)
The general idea of your code looks OK, but consider using a hardware timer rather than the for loop for data acquisition.  The sampling rate will be much more accurate and uniform because you eliminate (possibly cumulative) errors in timing.  See this post for an example.

Do you know how the FFT.MajorPeak function works?  If it simply finds the frequency of the largest point in the magnitude spectrum, this may not be a good measure of the 50 Hz peak etc.  Instead, consider taking the area under the curve around the frequency of interest f_0, say f_0 - 2 Hz to f_0 + 2 Hz.  The same code should be usable to measure the spectral power around any of the harmonics.

Also note that the mains electricity frequency is not exactly 50 Hz / 60 Hz.  The short-term variation is around plus/minus 1 Hz.  The above approach will also help make reliable readings.