"...it's funny how in emergency ,team of doctors spend 12 hours doing critical surgery on the kid after an fatal accident, saves the kid, and the parents thank god...."

Actually it is not funny or illogical to thank god because it was he who gave us life in the first place and it is he who decides whether we stay alive or dead after a surgery.

Islam believes in, as the famous saying goes - tie your camel and then put trust in god. Similarly, by going to doctor/surgery etc. means that we are tying our camel and then we are putting our trust in god after doing what best we could do.

And even the doctors/hospitals make the patients sign form before any surgery because they cant be 100% sure about what is going to happen after a surgery.

Lastly science did not change worlds destiny - it made achieve what was already pre-destined by God.