user20005: There are countless beings in the 31 realms of existence, and they all seem to have a Vijñāna, or a perception of "self".
When one becomes a stream winner (e.g. sotapanna), the view of this self is shattered. They realise that there is no such thing as a "self" and that it is just an illusion caused by the apparent flow of consciousness. So, once this view is shattered, how are we to guarantee that another brand new illusion won't start again, just as it did the last time and caused us to work hard to shatter it? I guess my question is, how do these illusions/ vijñānas get created in the first place?

user17652: At the stage of Sotapanna, a break or discontinuity is seen in the regular flow of consciousness. The usual prevailing sense of self cracks, but it cracks only like laminated glass. As such, the integrity of its operation, of its illusion, gives way to an underlying truth.
The next critical step is to address something called desire and ill will. These are not perhaps the best terms, simply because they describe the way in which the mind pushes and pulls at sensory experience and because we are very socially complex, this pushing and pulling can look rather sophisticated, and thus easily overlooked.
Now, to answer your question - in the Theravada scheme - the 10 fetters model - desire & ill will (-or pushing and pulling) are the karma-creating fetters. In effect, this means that once these have been seen through, most of the way you create suffering will end. This is the garrentee that you will not fall back!
There are so many people who will partially break even the higher fetters, but because they haven't addressed fetters 4 & 5, they keep getting yanked back into karma-creating territory. You can even see this in prominent teachers.
Those people do not understand the territory, they chase emptiness like a greyhound chases a stuffed rabbit! The greyhound never actually gets the rabbit, so day after day, they chase stuffed rabbit after stuffed rabbit. What a bore! They still have good things to say and they write interesting and helpful content, even books.
In any case, you can view fetters 4 & 5 as all the ways in which you try to give a definition to the central theme of you: some things you push away, and some things you pull towards you.
In doing these things, you create (sankhara) or build, or put together a series of conditioned actions (karmas) which in turn produce a corresponding and reflective response from the world (vipaka). One then feels trapped in a self-fulfilling prophecy that only achieves what the greyhound achieves - nothing!
By the way, there's nothing wrong with getting things in the world - it's the effort and upkeep of that gnawing sense of self that might be said to cause most of your strife. Last week I travelled to the city to buy some drumsticks, and later that day I was throwing out supreme beats, so stuff still happens even without a self.

user23952: "once this view is shattered"
Maybe the word shattered is a bit misleading (overly dramatic, stressful, etc). When we come to understand something clearly, for the first time, doesn't that normally bring a sense of relief? And maybe: new possibilities, promise, hope, etc?
Maybe we should say our self-view is adjusted, improved, clarified, that sort of thing—not shattered.
The Buddha never said that there is no self. He said that whatever is inconstant, is stressful, and it would be wrong to consider that as "me" or "mine."
On the other hand, walking The Path requires a healthy "sense of" self: this is a skillful use of the concept of "self."
"how do these illusions/ vijñānas get created in the first place?"
In a word: ignorance.
As you progress on the path, your Right View(s) replace your wrong views and ignorant views and unskillful ways. This is what it means to become a stream winner: you've entered the stream. The stream of new understandings and behaviors and results—Right View, Right Resolve, etc —and you are pulled along with all of that.
Okay, maybe you have to paddle a little, but you do it willingly, and gladly because you know there's no going back to your ignorant old ways now.
"is it guaranteed that after enlightenment we are free from it forever?" (from your comment)
There are no guarantees in life, but the Buddha says: "My actions are the only true belongings. My actions are the ground on which I stand."
You don't need (or want) other people's promises, when you've got the power of skillful action instead!
As far as knowing the truth of any of this, there's a sutta (see below) where an average person (who happens to be a prince) asks a monk about the teachings of the Buddha. But because he's a prince and doesn't want to give anything up, his question is not sincere, and he really just wants to dismiss whatever the monk says so he can get back to his life of sensuality. It's a good example of how ignorance frames and ignores whatever it needs to, in order to get what it wants—but remains ignorant in the bargain.
The main point is: guarantees are unreliable, better to put a little effort in and find out for yourself instead. Also, the view improves a little bit every step you climb.
Excerpt from MN 125 Dantabhūmi Sutta | The Level of the Tamed:

“Aggivessana, it’s as if there were a great mountain not far from a
village or town, and two companions, leaving the village or town, were
to go hand in hand to the mountain. On arrival, one of the companions
would stay at the foot of the mountain, and one would climb to the top
of the mountain. The companion staying at the foot of the mountain
would ask the companion standing on top of the mountain, ‘What do you
see, my friend, standing on top of the mountain?’
“He would say, ‘I see delightful parks, delightful forests, delightful
stretches of land, & delightful lakes.’
“The other would say, ‘It’s impossible, my friend. It’s unfeasible,
that standing on top of the mountain you would see delightful parks,
delightful forests, delightful stretches of land, & delightful lakes.’
“Then the companion standing on top of the mountain, descending to the
foot of the mountain and grabbing his companion by the arm, would make
him climb to the top of the mountain. After letting him catch his
breath for a moment, he would ask him, ‘What do you see, my friend,
standing on top of the mountain?’
“He would say, ‘I see delightful parks, delightful forests, delightful
stretches of land, & delightful lakes.’
“The other would say, ‘But just now didn’t I understand you to say,
“It’s impossible, my friend. It’s unfeasible, that standing on top of
the mountain you would see delightful parks, delightful forests,
delightful stretches of land, & delightful lakes”? Yet now I
understand you to say, “I see delightful parks, delightful forests,
delightful stretches of land, & delightful lakes.”’
“The other would say, ‘But that’s because I was standing blocked by
this great mountain and didn’t see.’


20005: <p>There are countless beings in the 31 realms of existence, and they all seem to have a Vijñāna, or a perception of &quot;self&quot;.</p>
<p>When one becomes a stream winner (e.g. sotapanna), the view of this self is shattered. They realise that there is no such thing as a &quot;self&quot; and that it is just an illusion caused by the apparent flow of consciousness. So, once this view is shattered, how are we to guarantee that another brand new illusion won't start again, just as it did the last time and caused us to work hard to shatter it? I guess my question is, how do these illusions/ vijñānas get created in the first place?</p>
 17652: <p>At the stage of Sotapanna, a break or discontinuity is seen in the regular flow of consciousness. The usual prevailing sense of self cracks, but it cracks only like laminated glass. As such, the integrity of its operation, of its illusion, gives way to an underlying truth.</p>
<p>The next critical step is to address something called desire and ill will. These are not perhaps the best terms, simply because they describe the way in which the mind pushes and pulls at sensory experience and because we are very socially complex, this pushing and pulling can look rather sophisticated, and thus easily overlooked.</p>
<p>Now, to answer your question - in the Theravada scheme - the 10 fetters model - desire &amp; ill will (-or pushing and pulling) are the karma-creating fetters. In effect, this means that once these have been seen through, most of the way you create suffering will end. This is the garrentee that you will not fall back!</p>
<p>There are so many people who will partially break even the higher fetters, but because they haven't addressed fetters 4 &amp; 5, they keep getting yanked back into karma-creating territory. You can even see this in prominent teachers.</p>
<p>Those people do not understand the territory, they chase emptiness like a greyhound chases a stuffed rabbit! The greyhound never actually gets the rabbit, so day after day, they chase stuffed rabbit after stuffed rabbit. What a bore! They still have good things to say and they write interesting and helpful content, even books.</p>
<p>In any case, you can view fetters 4 &amp; 5 as all the ways in which you try to give a definition to the central theme of you: some things you push away, and some things you pull towards you.</p>
<p>In doing these things, you create (sankhara) or build, or put together a series of conditioned actions (karmas) which in turn produce a corresponding and reflective response from the world (vipaka). One then feels trapped in a self-fulfilling prophecy that only achieves what the greyhound achieves - nothing!</p>
<p>By the way, there's nothing wrong with getting things in the world - it's the effort and upkeep of that gnawing sense of self that might be said to cause most of your strife. Last week I travelled to the city to buy some drumsticks, and later that day I was throwing out supreme beats, so stuff still happens even without a self.</p>
 23952: <p><strong>&quot;once this view is shattered&quot;</strong></p>
<p>Maybe the word <em>shattered</em> is a bit misleading (overly dramatic, stressful, etc). When we come to understand something clearly, for the first time, doesn't that normally bring a sense of relief? And maybe: new possibilities, promise, hope, etc?
Maybe we should say our self-view is <em>adjusted</em>, improved, clarified, that sort of thing—not shattered.</p>
<p>The Buddha never said that there is <em>no</em> self. He said that whatever is inconstant, is stressful, and it would be wrong to consider that as &quot;me&quot; or &quot;mine.&quot;</p>
<p>On the other hand, walking The Path requires a healthy &quot;sense of&quot; self: this is a skillful use of the concept of &quot;self.&quot;</p>
<p><strong>&quot;how do these illusions/ vijñānas get created in the first place?&quot;</strong></p>
<p>In a word: <em>ignorance</em>.
As you progress on the path, your Right View(s) replace your wrong views and ignorant views and unskillful ways. This is what it means to <em>become</em> a stream winner: you've entered the stream. The stream of new understandings and behaviors and results—Right View, Right Resolve, etc —and <em>you</em> are pulled along with all of that.</p>
<p>Okay, maybe you have to paddle a little, but you do it willingly, and gladly because you know there's no going back to your ignorant old ways now.</p>
<p><strong>&quot;is it guaranteed that after enlightenment we are free from it forever?&quot;</strong> (from your comment)</p>
<p>There are no guarantees in life, but the Buddha says: &quot;My actions are the only true belongings. My actions are the ground on which I stand.&quot;
You don't need (or want) other people's promises, when you've got the power of skillful action instead!</p>
<p>As far as <em>knowing</em> the truth of any of this, there's a sutta (see below) where an average person (who happens to be a prince) asks a monk about the teachings of the Buddha. But because he's a prince and doesn't want to give <em>anything</em> up, his question is not sincere, and he really just wants to dismiss whatever the monk says so he can get back to his life of sensuality. It's a good example of how ignorance frames and ignores whatever it needs to, in order to get what it wants—but remains ignorant in the bargain.</p>
<p>The main point is: guarantees are unreliable, better to put a little effort in and <em>find out for yourself</em> instead. Also, the view improves a little bit every step you climb.</p>
<p>Excerpt from <a href="https://www.dhammatalks.org/suttas/MN/MN125.html" rel="nofollow noreferrer">MN 125 Dantabhūmi Sutta | The Level of the Tamed</a>:</p>
<blockquote>
<p>“Aggivessana, it’s as if there were a great mountain not far from a
village or town, and two companions, leaving the village or town, were
to go hand in hand to the mountain. On arrival, one of the companions
would stay at the foot of the mountain, and one would climb to the top
of the mountain. The companion staying at the foot of the mountain
would ask the companion standing on top of the mountain, ‘What do you
see, my friend, standing on top of the mountain?’</p>
<p>“He would say, ‘I see delightful parks, delightful forests, delightful
stretches of land, &amp; delightful lakes.’</p>
<p>“The other would say, ‘It’s impossible, my friend. It’s unfeasible,
that standing on top of the mountain you would see delightful parks,
delightful forests, delightful stretches of land, &amp; delightful lakes.’</p>
<p>“Then the companion standing on top of the mountain, descending to the
foot of the mountain and grabbing his companion by the arm, would make
him climb to the top of the mountain. After letting him catch his
breath for a moment, he would ask him, ‘What do you see, my friend,
standing on top of the mountain?’</p>
<p>“He would say, ‘I see delightful parks, delightful forests, delightful
stretches of land, &amp; delightful lakes.’</p>
<p>“The other would say, ‘But just now didn’t I understand you to say,
“It’s impossible, my friend. It’s unfeasible, that standing on top of
the mountain you would see delightful parks, delightful forests,
delightful stretches of land, &amp; delightful lakes”? Yet now I
understand you to say, “I see delightful parks, delightful forests,
delightful stretches of land, &amp; delightful lakes.”’</p>
<p>“The other would say, ‘But that’s because I was standing blocked by
this great mountain and didn’t see.’</p>
</blockquote>
