The main character is an unemployed mathematician with schizoid personality disorder whose social interactions are mostly with his old professor and the people in his apartment building. The movie is a thriller, but the main character's isolation from the rest of the world is rather stark. This is helped by the fact that it was filmed in high-contrast black and white.
It's been a while since I've seen it but Cast Away is about being stranded all alone and dealing with loneliness. I have a feeling this isn't what you had in mind.
The Perks of Being a Wallflower is one of my favorite movies. Although he's not without friends the entire movie, I think you might still appreciate it.
The new Joker movie is definitely worth the mention. Although depressing, I really appreciated the movie. It's not actually a superhero movie in case that's deterring you from watching it.
Although I haven't seen it yet, Lost In Translation is near the top of my watchlist. It might be up your alley.
Does being lonely due to war and it's trauma count? If yes, I can highly recommend old soviet movie Come and See - https://www.imdb.com/title/tt0091251/
Just don't get discouraged by country of origin, it has no effect on the movie.
I'm not religious, but I literally felt what I can only describe as my soul dying and leaving a painful and heavy emptiness, during and after watching that movie.
So is the movie. It's really intense though. I mean really. It shows all the filth of war. And despite "hero" (a boy) is almost always among other people, he's in fact really lonely. Especially in his misery.
Koe no Katachi - very popular anime movie. Also one of my favourites.
Bocchi the Rock - Anime about an extremly introverted girl wanting to play guitar in a highschool band.
Re-Life - its an anime about a grown up guy getting a chance to re-live his high-school days as part of a experiment or something like that. It was pretty good.
Lookism - its a Manhwa, but also has an anime. Basically the main character gets 2 bodies mysteriously. The original body is the ugly one which people bully him for and the second body is like that of a (male) kpop artist which people view differently.
Death's game - it's a kdrama I recently watched. Although it doesn't exactly fit in with the theme of 'lonlieness' I thought I'd mention it.
P.S - some shows I mentioned here might not be as loneliness inducing as you think.
"A Silent Voice" (anime movie) is my go-to when I want to feel profound emotions, even if it's crying about the fact that all my friends are hundreds of miles away or dead now and I apparently forgot how to make new ones.