Barnes comments on Daniel 6:17 include the following:
And a stone was brought, and laid upon the mouth of the den - Probably
a large flat stone sufficient to cover the mouth of the cave, and so
heavy that Daniel could not remove it from within and escape. It was
usual then, as it is now, to close up the entrance to sepulchres with
a large stone. See John 11:38; Matthew 27:60. It would be natural to
endeavor to secure this vault or den in the same way - on the one hand
so that Daniel could not escape from within, and on the other so that
none of his friends could come and rescue him from without.
The parallels with Christ's burial are obvious and marked.
This is fairly obvious - a large stone, immovable by Daniel inside, was used to prevent his escape.. However, there is another question possibly implied in the original question expressed in Gill's exposition:
And a stone was brought, and laid upon the mouth of the den,.... Not a
heap of stones, but a single one, a very large one, sufficient to stop
up the mouth of the den, that nothing might enter in at it, or be cast
into it: this stone was brought by proper persons, and a sufficient
number of them, according the order of the king, or his princes, or
both; for what Jarchi says, of there being no stones in Babylon, only
This raises the question: why a large stone and where might it have come from? (Amncient Babylon used bricks because large stones were very scarce.) And, Why not simply a bolted door with its support made of bricks as was so common in ancient Babylon?
No Bible answer to these questions is available and no viable (sensible) suggestion from commentators is forthcoming either. Further, no ancient lion's dens have been discovered so archaeology is also unable to help.
Sometimes we must just accept Scripture as it is.