Hand got crushed by hammer, doctor prescribed silver sulfadiazine cream. Was that right?

Possibly. if there are opened areas it potentially can be used. It is generally used for burn wounds though.
It's a good topical. Antibiotic. Will do nothing for a contusion or a crush but good antibiotic for a wound.
Maybe. Silver sulfadiazine cream is a good topical antibiotic and is commonly used in patients with burns. Do you have blisters? Open wounds?