How to maintain a relationship in highschool?

My boyfriend gets mad if I walk past him in the hall but it isn’t on purpose when he’s with his friends I don’t want to bother him even though I love him with all my heart 😩 and I’m so stressed from it because I don’t want to lose him but I’d hate to be a bother you know.. like he’s my boyfriend of course I want to hang out with him but I don’t want to be any kind of burden. He said something like he doesn’t know how we’re gonna work out but I’m a loyal girl, and yk I’m not doing wrong in my eyes but in his yes.. I really need advice