The bishop on g5 is attacking the d8 square and the king cannot pass through an attacked square when castling.
okay thank you!!