Energy dependence and fluctuations of anisotropic flow in Pb-Pb collisions at \( \sqrt{s_{\mathrm{NN}}}=5.02 \) and 2.76 TeV