In What If...? season 1 episode 3, "What If... Earth Lost its Mightiest Heroes?", Clint Barton is ready to shoot Thor at Mjolnir's landing site when Hank Pym forces him to shoot. However, this instantly kills Thor, who is a literal god. I couldn't quite see where the arrow went through, but even if it hit something vital, Thor probably would have been able to handle it, aside from the fact that his reflexes likely would have been able to catch it. How does a single arrow kill an Asgardian god? Is it possible that without his powers and Mjolnir he was weakened?
When Odin cast Thor to Earth in the first Thor movie, he stripped him not only of his hammer and armour, but his power as well.
ODIN: Thor Odinson, you have betrayed the express command of your king. Through your arrogance and stupidity, you've opened these peaceful realms and innocent lives to the horror and desolation of war! You are unworthy of these realms! You're unworthy of your title! You're unworthy of the loved ones you have betrayed. I now take from you your power! In the name of my father and his father before, I, Odin Allfather, cast you out!
Thor later acknowledges his weakness -- relative to Sif, Volstagg, Fandral and Hogun -- when he tells them that he's "just a man", and that he'd only be a liability if he tried to help them fight the Destroyer. The other Asgardians were all stronger than he was at this point in the film, so they took on the Destroyer without him.
THOR: Jane, you have to leave.
JANE FOSTER: What are you gonna do?
THOR: I'm staying here.
VOLSTAGG: Thor's going to fight with us!
THOR: My friends, I'm just a man. I'll only be in the way, or worse, get one of you killed. But I can help get these people to safety.
As Silly but True notes in his answer, Thor isn't truly immortal anyway, but in the scene where he was shot by Barton's arrow, he wasn't even superhuman. It's unclear what, if any, effect that arrow would've had on him if he'd been fully-powered at the time.
Asgardians are not immortal.
As confirmed in Loki, 9,719 Asgardians died during the fall of Asgard as seen in Thor: Ragnarok, which the TVA classified as a Class 7 apocalypse.
Of those Asgardians remaining, Thanos killed about another 3/4 more — slaughtering half on the ship by hand, and then killing another half of that remaining half with his snap.
Thor, being an Asgardian, can still be killed by weapons. In the comics, Thor has been killed multiple times.