Use of cum

Salvēte omnēs,

I don’t understand why cum are in these sentences

Cum avis volat, ālae moventur. Cum homō ambulat, pedēs moventur. Cum piscis natat, cauda movētur.” (Cap. XI)
“Ō, quam longae sunt hōrae, cum necesse est tōtum diem in lectō jacēre!”

Why would cum be used in these sentences?

I’ve been told not to translate, except for difficult sentences, so
“O, how long are the hours, with the necessity is the whole day to rest in bed!” That doesn’t sound right…

Grātiās vōbīs agō

Hello,
It’s because it isn’t the same “cum” as the one you saw before. If you try to see it as a totally different word, maybe it will make sense to you.

cum plus the ablative = with

but you don’t have that here. cum here is temporal when

it’s ok to translate if you want to communicate your understanding of a sentence but that can only happen when you have understood the syntax.