The most important thing is to give your brain time to adapt - the shift from online to in-person is a big change, and it's completely normal to feel like your concentration dropped those first few weeks. You probably had fewer visual and audio distractions in online classes, so now you have to relearn how to filter out noise and focus in the classroom; that's something you can train. In the meantime, try studying in quiet places, break your material into smaller chunks, and if you can, talk to your teachers about how you're feeling - a lot of them understand that this kind of transition takes time. Give it another month or two before you start worrying; most people who go through this adapt pretty quickly.