The nanohertz stochastic gravitational wave background from cosmic string loops and the abundant high redshift massive galaxies