To give stock, transfer the shares to the recipient’s brokerage account or a child’s custodial account. Your cost basis, what you paid, goes with them, so the recipient owes tax on your gain when they sell. Give appreciated shares to someone whose low income means 0% tax on long-term gains, and sell losing shares yourself to deduct the loss.

Source