IS it true, I ask Bo Burnham, Scotland can claim your first panic attack? The comedian turned film maker smiles. "Oh yeah, that's actually true," he says, thinking back to his opening night at the Edinburgh Fringe in 2013. "It was at the Pleasance Grand. I probably didn't realise what it was for six months. I thought it was jet lag."

He starts to describe the experience. Tunnel vision, shortness of breath. "It feels like a little out-of-body, floating above yourself watching yourself. It was also 11.30 at night, so it was an abstract space. There were a lot of things in place. It was the perfect cocktail for it.

"I had always known I struggled with stage fright but it never crescendoed into something concrete. When it happened a few more times I realised it wasn't a fluky thing."

It is the last day in February and Burnham is in town for the Glasgow Film Festival to talk about his debut film Eighth Grade, which is screening later this evening. It's very good. The story of 13-year-old Kayla (played with a raw, painful intensity by Elsie Fisher), who records vlogs that hardly anyone watches and tries and fails to make friends, it's a film about anxiety, adolescence and social media. Burnham brings a hard-won authority to the first of those themes, but he's just as sharp on the others.

The result is an itchy, immersive movie that reminds you of just how horrible being a teenager can be. It also suggests that teenagers now, in the world of Instagram and Snapchat, have it worse than in the past. In short, it's film as anxiety dream.

Read More: Jonah Hill on his film Mid90s

Burnham, now an elderly 28, turns out to be the best guide to what that might be like. "I'm the oldest person who grew up on the internet and the youngest person who is allowed to make a film, so I can kind of talk about this first," he admits.

"I hadn't really seen young people represented correctly. I was seeing them in the media as these selfie-obsessed, narcissistic, shallow kids who are just on their phones all the time.

It was not a representation he recognised. "I had a young audience and I was in dialogue with them and, oh my God, these kids are anxious and in their heads and very self-conscious and their experience with the internet is not surface level. It's not narcissistic. It's actually something much deeper and stranger and heady."

Eighth Grade is a beginner's guide to that roiling, stomach-churning headiness. And a reminder of how quickly tech is changing. "When I was 13, I had a Motorola phone and no social media," admits Burnham. "Social media doesn't really show up in its current form until … Well, six months ago.

"But the real heavy hitters were Instagram and Twitter. When it became posting raw photos, like Instagram, raw thoughts, like on Twitter, that's when it starts to reach really deep into you. I can't imagine what that would have been like when I was 13. I mean, I would have been absolutely consumed by it."

Are we changing what it means to be human through this technology or is that overstating it? "No, I don't think you can overstate its effect. I think it's mostly changing the way we see ourselves. Everyone talks about cyberbullying. The real problem is what we do to ourselves and how we view ourselves."

In what sense? "It depersonalises you from yourself. It feels like the main thrust of some people's day is to live their life in the real world so that they can sit in their bed at the end of the night and look at their life on their phone and that's where the satisfaction will come. The satisfaction will come when you view your life as an audience member. It's an externalisation of what you are.

"That's very, very strange and there's no scaffolding for us to even talk about it."

Read More: Mike Leigh on his film Peterloo

For research for the film Burnham immersed himself in teenage vlogs. "Between every word you just imagined what this person's life must be like. What is her life like when she's not talking? Why is she saying this? Why has she decided to sit down and make a 10-minute video called 'How To Be Cool'? What happened this week that made her want to do this?"

Kayla suffers acne, teenage pool parties, unwanted attention from older boys as well as her own anxieties. And yet, she is also quietly heroic in the way she perseveres. "The hope of the film is to portray very, very small moments as very significant," Burnham suggests, "and to show that to do the tiniest thing is incredibly heroic.

"But that's also what anxiety feels like subjectively. Anxiety usually grafts itself onto pretty mundane, banal moments in your life and elevates the stakes, so going to the grocery store feels like slaying a dragon."

Fisher embodies this all so well. How did Burnham find her? "She was the second person in the room. We saw a hundred kids after her, but she was the only choice the entire time. No one came even close to her. She's just able to bring the chaos of what it means to be a kid to the confines of a role.

"She also understood shyness in a way that other actors didn't. Young actors thought shyness was cowering in the corner. She knew that being shy is trying to speak at every moment and not being able to. She made Kayla feel active."

There are parts of Eighth Grade that do feel very alien to viewers on this side of the Atlantic. Like "Shooter's Drill", where pupils are taught how to react if a gunman comes into the school.

That is a thing, Bo? "Yeah, for sure. That's very real. I couldn't even show how intense they usually are. I wrote that in 2014 so that was before this horrible resurgence of school shootings in America. Columbine happened when I was 10. I felt the spectre of that through my entire childhood. I had bomb drills in high school and shooting scares in high school."

Shooting scares? "A letter gets sent to the school and we are put on a lockdown because of a threat. In the film you see what she is dealing with and you get the white noise of the background, which is incredibly hyper-violent, hyper-sexual.

"Oftentimes the kids aren't conscious of it. The kids are looking past it, not paying attention to it. The most terrifying thing about a scene like that is the kids are bored. It's boring to them."

Having made the film, how does he reflect on his own issues with anxiety? "My anxiety is improved. I don't know if that's the film. I don't know if that's getting older. Both things you can't really know. But I tend to think a lot of interior problems tend to die or at least don't thrive in the sunlight. They tend to grow in dark, hidden places. So, I've just tried to speak about what I struggle with out loud to take the power away from it a little bit."

Eighth Grade is in cinemas from today