I have a lenovo h520 with pentium g2020 processor. Will my pc support for upgrading it by replacing the processor with i5 2400?

I have a lenovo h520 with pentium g2020 processor. Will my pc support for upgrading it by replacing the processor with i5 2400?

Most laptops can't be upgraded like that. See lenovo website for your exact model -- if other versions do not have superior cpu, it can't be done. Then, ask lenovo support for this is possible

Processor socket LGA 1155 (Socket H2)

So any processor will need to be with that socket shape.
Here is a list of possible CPUs:
From

Maybe, you have to check the socket size and volts.