Deadbolt locks from outside with key, but not from inside
In a deadbolt, the key cylinder is often directly linked to the bolt.  But the hand turn-able knob only actuates on the cylinder.

So under normal operation, the knob turns the cylinder, causing the bolt to move.

The knob usual has a socket of some sort, and there's a shaft that comes from the key cylinder side, through the door.  During installation, the socket should be lined up with the shaft.

It's possible that the knob might not have gotten installed correctly, leading to the shaft missing the socket, and the knob indoors spinning freely with no affect.

Unscrew the deadbolt, and hold the key side in place while you slowly remove the knob side and look inside.  Either the shaft and socket are misaligned. Or the socket is broken.

ADDENDUM AFTER YOU ADDED THE PICTURE TO YOUR QUESTION:
The kind of lock you posted was entirely not the kind I had envisioned. Nonetheless, it would have he same failure.  And it's clearly been removed before and re-installed by someone clumsy enough to loose a screw.  So I'd expect it very likely to have been put back together wrong.

This could be extremely dangerous if any enemies got a hold of the keys or owned a set of lock picks.  You could burn alive if they locked you in and set the building on fire.  I'd fix this at once, and if unable, bring the lock parts from the door, to a hardware store, and get a replacement.