It's good that you did this with a Live USB or you'd have lost some data, almost certainly. Cleaning up after that would have been a huge waste of time.
First, you ran what's known as a fork bomb. A fork bomb is a simple, often obfuscated, command that will keep spawning new processes, folders, or files until it fills up disk space, eats CPU cycles, or consumes all the RAM. This results in the computer freezing because it has no more resources to give.
Second, you deleted your DE (desktop environment) which is what you see, it's the graphics that you interact with, the windows that you have open (sort of - there's a window manager but we'll skip that for now). Basically, you killed everything that you could click on.
It's good to learn. Use your favorite search engine before typing in commands into the terminal. Always, always know what the command does before pressing ENTER. I can not emphasize that enough. There are people who will intentionally mislead you. The terminal is a potentially powerful tool. It's your greatest tool in your toolbox but, like all tools, it must be wielding carefully.
If you'll tell us what the command was, for the fork bomb, we might be able to digest that and tell you exactly what it did and why. You seem like a curious sort so maybe you'd also like to learn that?
You've now included the code for your fork bomb. I'll include this for the next person to come along. If you look at it and parse the logic, you can see that it's saying that so long as a condition exits (is true) then do something (make an enumerated directory) and, because there's nothing telling it to stop (a loop), it will keep on going until the resources are consumed, RAM is eaten up, or until there's just some sort of collision that makes things freeze up. (This could be all sorts of things like a memory leak but that's probably not a factor here.)
From the sounds of things, or from what I'm reading, it appears like you did a pretty good job. This is a clear warning for others, to not run your code (you should add that to your post with the edit function or someone else can if you want). It was creative. I don't think I've ever seen it done quite that way but the theory is pretty much the same with all of them. Again, for others, this can be hidden in obfuscated code or code you simply may not understand if you don't know how to parse Perl (as an example). This is a fine example of what not to do.
I dare say, you should finish installing it and have some more fun. Just keep good backups.