Hi Gerrit, welcome to the forum. Could I ask you to introduce yourself here
I'll leave it for others to comment more fully on your question, but there are a couple of points I'll just mention in passing. Firstly, people new to the classical guitar nearly always apply much more pressure than necessary with the left hand. It's useful to experiment to see just how little left-hand pressure you need to apply while still producing a clean note, and in fact it's possible experimentally to play quite a lot without using the thumb at all, just bracing the guitar body with the right forearm. Often it's not doing much more than steady the hand. Even barré chords usually need less pressure than you might think, and you don't always need to apply pressure across all the strings anyway, only those being played. Incidentally it's important that the first finger is correctly placed just behind the fret to produce a clean sound with minimal pressure.
Secondly it's always a good idea to take regular breaks, every hour perhaps, if not more frequently, and to stop promptly if you feel pain. Playing through pain can lead to lasting damage.
Needless to say, it would also be useful to get it checked by a doctor if it persists.
Classical Guitar Forum.
"Experience is something you don't get until just after you need it." - Steven Wright