In my country swimming lessons are mandatory with everyone swimming 25m by aged 10. School takes them on a bus to the nearest community pool until they can swim.
In civilised countries, governments provide accessible swimming lessons as it's core life skill.
YMCA, Public pools, summer camps, churches, mosques, community groups, cheap private lessons
Those are not always available. As in, churche or mosque exists, but don't have pool and don't teach swimming. Private lesson exists, but is not cheap.
Summer camps are expensive, like common.
Churches will teach kids at community pools. I went to Christian school from elementary to 8th grade and we did all sorts of things in the summer for cheap