Sink drain too far from the wall
I assume your asking about how to tie your sink drain to the wall stub. Standard 1 1/2&quot; PVC drain pipe has slp compression fittings that give you a lot of flexibility in setting up your P trap and drain. In most cases you can make adjustments without shortening the wall stub.
However, in some cases you may have to shorten the wall stub. If you absolutely have to shorten it you can do so by cutting it on the wall side of the connector in the picture. Don't trim off any more than you absolutely have to. Do a square cut and debur the end. You can then buy a new connector and attach it with PVC adhesive. Follow all directions regarding priming, etc.
Here is a guide on setting up a proper P trap: