Yes, on most phones from the last few years. The MegaEsim Pakistan eSIM runs on Jazz, the biggest mobile operator in the country. Jazz has 4G in the places most visitors actually go, so you get a steady connection.
You need a phone that supports eSIM and is not locked to your home carrier. That covers the iPhone XS and newer, most recent Google Pixel and Samsung Galaxy models, and many other modern phones. If you are not sure, you can check before you buy. The plan is data only, so you use apps like WhatsApp for calls and messages instead of a regular phone number.