That’s good you can recognise the behaviours. These are the actions (known as compulsions) that make your intrusive thoughts stronger. They’re what you stop as part of cbt.
Well done for trying to stop missing class. Its expected that it made you feel so anxious you couldnt concentrate but this will get easier with time so keep going!