Replacing a UPVC door lock is pretty simple in most cases, thee locks use a cylinder called a euro cylinder. Euro cylinders come in several different sizes and so you need to measure the existing euro cylinder to ensure that you get the correct size replacement, please see here- Euro cylinders | Euro cylinder sizes
This is a standard euro cylinder that can be found in most UPVC door locks. When measuring the euro cylinder you can measure from where the retaining screw locates just below the cam. You need to measure the external and internal measurement from the centre of the screw/cam.
This is the UPVC door in the closed position. In order to replace the lock you need to be able to open the door, if you can't open the door you need might be able to snap the existing cylinder and open the door unless the cylinder is anti-snap.
When the door is open you will notice a Phillips head screw that is directly in line with the euro cylinder.
Once the screw is fully removed you can carefully pull the euro cylinder out of the lock, you will need to turn the key at the same time to get the cam past the lock.
Remove the euro cylinder completely from the lock.