We use could to talk about a general ability somebody had in the past.
- Superman could fly like a bird.
(We don’t talk about a specific time or event.) - He could speak German very well.
We use was/were able to to talk about an ability somebody had at a specific time or event in the past.
- Spider-man wasn’t able to climb the building because it was raining.
(We talk about a specific time or event – when it was raining.) - He was able to practise his German while we were in Berlin.