Hey
@Vilbers!
The rattling sound is probably from the camera gimbal that actually moves when you shake the phone.
Now, as for the phone not working; were you updating your phone, when this issue occurred? It could be an update that just froze the phone, it might need a hard reset.