Crab into the wind so the ground track stays on the line.
The airplane flies through the air, but the CDI measures your position over the ground. In a crosswind the wind pushes you sideways off course even when your heading is spot-on the course.
Point the nose slightly into the wind. The aircraft is now flying a heading that isn't the course, but its ground track is. Start with a 5° correction, watch the needle — if it keeps drifting, add more; if it comes back too fast, reduce.
If 5° left stops the drift, that's your wind-correction angle for this leg. Split-half your corrections after the needle centers so you don't chase it: 5° stops the drift → hold 5° until the next drift.