The purpose of having nuclear weapons isnt to hit each other with nuclear bombs. This is something that most people get wrong that just because you have a nuclear weapon you should be using it aswell.
Having a nuclear weapon allows you to create nuclear deterance.
When it comes to artillery and army equipment, india is far ahead. They have better artillery, planes etc. India can easily fight a conventional war with Pakistan.
What Pakistan has done in return is to tackle the conventional attack of india, they dont really have the capabilities interms of equipment, thus they have made nuclear missle warheads.
Pakistan has a policy of first strike not second strike. India has a second strike policy. The reason for that is, if India does a conventional advancement, we will launch a nuclear. Our policy is to defend the country from any military or even economical destruction by india on us.
The most dangerous misslehead we have is the Nasr. Its only 60 km range. I used to wonder what was the purpose of having such range capability, but i learned its because of our policy to match the indian advancement.
Thus, to answer the question, the nuclear provide us deterance. Its provides the country with security from india. India cant make official afvancements towards pakistan due to our first strike capability and policy.
If you talk about the oppurnitity cost, yes, Pakistan has paid a high oppurtunity cost on it. Education budget has been reduced again by pmln just few days ago.
Economically, we have suffered with this, but nuclear was needed, or else we would had no country today.
It was because of the nuclewr deterance we went for siachan and today atleast have 30percrnt claim on it. We knew that once we enter the conflict other countries will intervene and stop both countries from going to war.