I want to count sum of squares of first $x$ prime numbers. $$1^2+2^2+3^2+5^2+\ldots +p_x^2$$ Is there a formula to do it? (like the formula to count the sum of squares of natural numbers)
There is no closed form of the sum of primes or prime powers. The best we have is an asymptotic formula. Rafael Jakimczuk has given the asymptotic sum of prime powers in the paper below so you can estimate of the sum of the squares of primes.