NEED ADVICE HELP PLEASE

This may be long and annoying to read but I am having an anxiety attack about all right now and I just need some advice.

So I’m 17 and a junior in HS and I really like this guy. I have never dated anyone or liked anyone this much before. We don’t really talk that much and only have one class together and we sat together at the beginning of the year and he was pretty nice to me and talked to me. I’m the really quiet girl and I was nervous around him already so I was even more quiet and awkward. Anyway then he got moved and we stopped talking but 3 out of the 4 days of class he would make a big deal out of saying hi to me. So then last week we got moved next to eachother again and he slowly started asking me more and more questions about myself and me being me I just answered them and tried to make conversation but failed. So then yesterday all class he was asking me a whole bunch of random question, so much that we were getting in trouble for talking. I liked that, he talks to me even though I’m so awkward I make a fool of myself. So then today he barely talked to me and now I’m confused.

I would really like to get his phone number and talk to him more but I can’t work up the courage because I’m so scared he will reject me. I have really bad abandonment issues with a lot of people who have just threw me away after a while of friendship and I don’t want they to happen with him because he is so nice to me and makes me feel good. I’m also really bad at keeping a conversation when it’s more than one person I’m talking to.

I also do think that I’m his type and we NEVER talk outside of that class or sit next to a bother at lunch or even see eachother really. I don’t think I’m good enough for him or that he even really likes me or if he is just being nice because that’s how he is.

I don’t know what to do with him. Ugh I’m freaking out and I feel like I keep repeating myself but I really don’t want him to reject me or that if we do start talking or dating that things get weird because we only see eachother in one class and he doesn’t sit down for lunch he stands in the lunch line all period. I don’t want to get hurt.

Idk what to do. I will take anyone’s advice on what to do thank you. Also how do I ask for his number.