I already tried pastebin but the file was to large, gist isn't working either. Are you able to download it, or do you not want to do that? Ill try loading into a world instead of creating one and seeing if that makes a difference when it comes to how big the log is.
This may be a log from before I took everything out of my mods folder and tried again. Try this log, this time I was trying to create a world when the error occurred. take a look
This occurs when I am loading or creating a new world and the screen says "Loading World" in 1.18.2 forge. I don't have optifine in my mods folder, as a matter of fact I have no mods in my mod folder. Here's a link to the debug.log