After construction a cleaning pig is run through the pipeline, these are run at about 30 psi of air, if it should get stuck you just depressurize and put air on the other side to push it back to it's launcher
During construction on the pipelay ship a cable is pulling a sizing plate inside the pipe that's several hundred meters behind the ship, if there is a buckle as it's called the ship can then start backing up cutting off the pipes its just welded to bring up the damaged section and replace it
After the construction process a caliper or sizing pig through the pipeline prior to hydro testing.
This ensures that there are no dents/buckles or size deformations.
The client is paying for 48" of usable pipe and that what is they get, any pipe out of tolerances is up to the construction company to remedy.
After construction when the pipeline is in service an electronic or "smart" pig is run through the pipe after several years of use to check and monitor things like coating continuity and pipe wall loss. Nordstream isn't old enough to require this yet though. These don't get stuck, the pipe is of the correct size.
I've been reading on various websites about how a pig could have explosives on it to damage the pipe.
To do this you have to have a flow of gas through the pipe, Nordstream wasn't in use so no gas flow and no way to move a pig