Can I withdraw a gift

It depends.

As long as the gift has not yet been accepted by the recipient, you can cancel the gift.

The shares remain in your ownership until the recipient confirms that they accept the gift, after which the gift is transferred to the recipient.

If you then change your mind, contact the recipient, and they can return the gift free of charge.