Phantom dark energy as a natural selection of evolutionary processes $\hat{\rm a}$ $\textit{la}$ $\textit{genetic algorithm}$ and cosmological tensions