Is it shirk if I had uttered others name than Allah because of pain? I did this unknowingly will it fall under the ruling of shirk? Please help me.
I notice You are asking these types of questions frequently.
There is nothing wrong uttering others name than Allah because of pain. Like if when you got hurt you call out "O mom" or something. there is nothing wrong with that.
Side-Note: some of people would think who in the world say "o mom" when they get hurt. It depends on certain language. In my mother language(Bengali) it's common for people to scream saying mom when they got hurt.
However if you are a kind of person who gets these types of thought often. Then i would say, it's one of the tricks of shayatin. He makes you worry about small things. And makes you busy with useless thoughts. You you started doubting everything.
Al-Hasan bin 'Ali said:
"I remember that the Messenger of Allah ﷺ said: 'Leave what makes you in doubt for what does not make you in doubt. The truth brings tranquility while falsehood sows doubt.'"
Source: Sunan al-Tirmidhī 2518
Grade: Sahih (authentic)
And i agree there are certain things that could lead us to shirk. But Most of the time you can understand that, if that is doubt from devil or it can really lead you to shirk.
I would highly recommend you to watch this video by Sheikh Assim Al Hakeem