You're creating a problem here by using a stringbuilder. They are for building a single string. You can AppendLine if you want, but all that will do is make the single one existing string in the builder into a LONGER string with a CRLF character pair on the end. There isn't this concept of "lines" in a stringbuilder in the sense of "a collection of individual strings that you can shuffle around" like there is with e.g. a TextBox's .Lines property (which really is an array of strings, but there is a conversion step that goes between the single-string-with-CRLF-characters-in-it and array-of-strings-one-string-per-line)
Basically a textbox splits the text on CRLF when you ask for its Lines and if you set its lines it joins the array you give it together with CRLF to make one long string
I recommend you throw away the stringbuilder and just shuffle the lines in the textbox:
Dim rnd as New Random
Dim shuffledX = textbox1.Lines.OrderBy(Function(x) rnd.Next()).ToArray()
All this "getting lines out of a textbox, putting them into a builder, tostringing the builder (makes a single string), putting it in a List (your list has ONE string in it), getting the strings (there is only one) out of the list in random order....
Just throw it all away. Shuffle the .Lines
If you read a file to get your lines, you have a lines array, you can shuffle it!:
Dim x = File.ReadAllLines("path...")
Dim shuffledX = x.OrderBy(...).ToArray()
If your user gives you lines one at a time, put them into a List(Of String) and shuffle it:
Dim x as New List(Of String)
x.Add(Console.ReadLine())
x.Add(Console.ReadLine())
x.Add(Console.ReadLine())
x.Add(Console.ReadLine())
x.Add(Console.ReadLine())
Dim shuffledX = x.OrderBy(...).ToArray()
If you really are getting a string or a stringbuilder from somewhere, then split it on CRLF:
Dim s = $"My{Environment.NewLine}string{Environment.NewLine}with{Environment.NewLine}lines"
Dim x = s.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries)
Dim shuffledX = a.OrderBy(...).ToArray()
Once you have your shuffled lines
If you want to put them to a textbox, and theyre an array, you can assign them to the textbox Lines property:
textbox2.Lines = shuffledX
If you want to write them to a file, write the array:
File.WriteAllLines(...)
If you want to pump them to the console:
For Each s in shuffledX
Console.WriteLine(s)
Next s
If you need them as a string, a single string, then join the array into a single string:
Dim s = string.Join(Environment.NewLine, shuffledX)
You can set a textbox.Text = s, or put it in a stringbuilder (For Each t in s sb.AppendLine(t), or write a file (File.WriteAllText("path", s)), dump it to console (Console.Write(s))...
In all this, you have to be clear about what a stringbuilder is and isn't, what a string is and isn't and what an array of strings is/isn't. You have to use the most appropriate data storage for the task; if an array is coming in, shuffle the array. If a single string is coming in, split it to an array and shuffle the array. Don't take an array and put it into a stringbuilder and ask us to help shuffling the stringbuilder - it's madness, the only thing you can do there is undo the wrong step (of putting into the stringbuilder) by stringBuilder.ToString().Split() to undo the wrong step of putting the array into the stringbuilder in the first place - turning the stringbuilder into a string and then splitting the string gets back to the array that can be shuffled.
listabove only has one element - the entire string with all lines. First create an Array or List of your lines, then call.OrderBy(as you have done. Then second, loop through your randomized list and build your final string.