Need the receipt to print when a delivery driver takes the order from the restaurant instead of printing when he brings it back

Alright,

If you did the delivery installation the default way, then in your rules you should have a rule which updates ticket entity.

Open that rule and add Print job action(You may need to create this if you want a specific print template), similar to the screenshot below

Now, when a driver is selected, it should update the entity and execute a print job.