What is the meaning of 刚 in 变形金刚?
「剛」originally meant unyielding/stubborn/strong. 金剛 is a traditional phrase which is also used to translate a Buddhist word from Sanskrit (वज्र, vajra).

Vajra (PIE root: *weǵ-, English descendants: watch, wake, vigor, vigil) is seen by Buddhists as variously a thunderbolt or diamond, symbolising extreme hardness/power/indestructibility, and by semantic extension a kind of symbol or weapon, and further extension a guardian (spirit) which holds this weapon.

As you’ve already seen, 變形金剛 is a reference to Buddhist temple guardian statues (see 四大金剛) which each hold a kind of vajra (the weapon).