Led works fine but Relay not working by bc547
You haven't got a clamp diode (flyback diode) connected across your relay coil.

The resulting high voltage on relay switch-off will destroy the transistor.

You'll find plenty of details on this on the Internet.