The first use of por is for talking about the cause of something. You can think about the translation of the English phrases ‘due to’ or ‘owing to’.

English: The office is closed for vacation.

Español: La oficina está cerrada por vacaciones.

English: We arrived two hours late due to traffic.

Español: Llegamos dos horas más tarde por el tráfico.

English: They cancelled the concert due to the rain.

Español: Se suspendió el concierto por la lluvia.