Use the same QR code or activation codes from your purchase (you'll find them in your purchase confirmation email).
Whether you can install the eSIM on a different phone depends on your eSIM type. Some eSIMs can be moved to another device; others work only on the phone they were first installed on. You can check which type you have in your eSIM details.
If your eSIM is still installed on a broken phone, it cannot be transferred to another device.
An eSIM can be installed on only one device at a time. Breaking the phone does not automatically delete the eSIM from that device. If the phone does not turn on and you cannot delete the eSIM from its settings, the eSIM remains linked to that phone.
In this case, you will need to buy a new eSIM for your new phone.