The extended section when Jesus speaks of the Good Shepherd* comes halfway through the Fourth Gospel, and probably constitutes the heart of its teaching.
Here Jesus seems to be telling us the 'mechanism' by which he, personally, is offering us life everlasting; here he tells us by a long metaphor-parable just how-it-works.
It is about the Good Shepherd (and no other) saving his sheep from being killed; and we know from the rest of the Gospel that this means saving Man from death, by enabling resurrected life eternal in Heaven. The Good Shepherd leads his sheep through death to Heaven.
We hear about the two-sidedness of salvation: 'I know my sheep and are known of mine'. The Good Shepherd seeks us out, and we each recognise him.
On the one hand, fake shepherds (the hireling) cannot save. On the other hand, those who do not 'know' (believe-in, love, trust, have-faith-in) Jesus will not be saved.
What is led? The soul, after death. But why does it need to be led - why can't it find its own way to salvation? Because after death the soul becomes 'helpless', lacks agency - like a young child, a ghost, a sheep.
If unable to help itself, how then can the soul follow Jesus? Because - like a young child, or sheep - the dead soul still can recognise and love; and 'follow'.
Where does this happen? In the 'underworld'. Without Jesus, the disembodied, ghostly, demented dead souls wander like lost sheep - as described in pre-Christian accounts such as Hades of the Greeks, or Sheol of the Ancient Hebrews.
But how does Jesus save the dead souls? Everybody has known Jesus as spirits in the premortal world, so everybody can recognise him in the underworld; but only those who love Jesus will want to follow him.
So loving dead souls are the sheep that can recognise Jesus: the Good Shepherd, they can follow Jesus, and Jesus can lead them to Resurrected Life Everlasting.
Note: Souls that do not love Jesus will recognise him, but will not want to follow him. There are significant nuances to this, relating to love of 'neighbour' and the desires of individual souls; but that is the basic model.
Further note: This seems to be very hard for moderns to grasp; they seem to think that Jesus ought-to save people even when they don't want it - should compel people to Heaven because that is what is good for them - and if Jesus does not do this, then he is wicked.
But this attitude is totalitarian - based on the secular ideology of utilitarianism so beloved by the modern Establishment - who like to believe that (being wiser, cleverer and more virtuous people than the masses) they are 'managing' the world, 'for their own good'.
But Christianity is based around the creative freedom and agency of each individual person. This means that nobody can be saved against their will; each individual can, if he wills, defy the wishes of God. Whether you regard this a a good thing (I do) it is a fact of post-mortal life - Heaven must be chosen.
 Verily, verily, I say unto you, He that entereth not by the door into the sheepfold, but climbeth up some other way, the same is a thief and a robber.
 But he that entereth in by the door is the shepherd of the sheep.
 To him the porter openeth; and the sheep hear his voice: and he calleth his own sheep by name, and leadeth them out.
 And when he putteth forth his own sheep, he goeth before them, and the sheep follow him: for they know his voice.
 And a stranger will they not follow, but will flee from him: for they know not the voice of strangers.
 This parable spake Jesus unto them: but they understood not what things they were which he spake unto them.
 Then said Jesus unto them again, Verily, verily, I say unto you, I am the door of the sheep.
 All that ever came before me are thieves and robbers: but the sheep did not hear them.
 I am the door: by me if any man enter in, he shall be saved, and shall go in and out, and find pasture.
 The thief cometh not, but for to steal, and to kill, and to destroy: I am come that they might have life, and that they might have it more abundantly.
 I am the good shepherd: the good shepherd giveth his life for the sheep.
 But he that is an hireling, and not the shepherd, whose own the sheep are not, seeth the wolf coming, and leaveth the sheep, and fleeth: and the wolf catcheth them, and scattereth the sheep.
 The hireling fleeth, because he is an hireling, and careth not for the sheep.
 I am the good shepherd, and know my sheep, and am known of mine.
 As the Father knoweth me, even so know I the Father: and I lay down my life for the sheep.
 And other sheep I have, which are not of this fold: them also I must bring, and they shall hear my voice; and there shall be one fold, and one shepherd.
 Therefore doth my Father love me, because I lay down my life, that I might take it again.
 No man taketh it from me, but I lay it down of myself. I have power to lay it down, and I have power to take it again. This commandment have I received of my Father.
 There was a division therefore again among the Jews for these sayings.
 And many of them said, He hath a devil, and is mad; why hear ye him?
 Others said, These are not the words of him that hath a devil. Can a devil open the eyes of the blind?
 And it was at Jerusalem the feast of the dedication, and it was winter.
 And Jesus walked in the temple in Solomon's porch.
 Then came the Jews round about him, and said unto him, How long dost thou make us to doubt? If thou be the Christ, tell us plainly.
 Jesus answered them, I told you, and ye believed not: the works that I do in my Father's name, they bear witness of me.
 But ye believe not, because ye are not of my sheep, as I said unto you.
 My sheep hear my voice, and I know them, and they follow me:
 And I give unto them eternal life; and they shall never perish, neither shall any man pluck them out of my hand.