There's a lockring threaded on after the cog (with reverse thread) which stops the cog unscrewing. Check if it's tight up against the cog and you aren't able to unscrew it by hand
But first check if the cog itself is tight, because you might have unscrewed the cog tight against the lock ring while skidding. Then the lock ring seems tight, even though the cog is not fully engaged on all the hub threads.
I've had that before.
There's a lockring threaded on after the cog (with reverse thread) which stops the cog unscrewing. Check if it's tight up against the cog and you aren't able to unscrew it by hand