Yes, it is due to optifine. You can see at the end of the log that it says the following
OptiFabric error: OptiFabric could not find the Optifine jar in the mods folder:
C:\Users\heuse\AppData\Roaming.minecraft\mods
You must either add OptiFine back to this folder or uninstall it.
https://discuss.aristois.net/topic/13/how-to-uninstall-optifine-optifine-error-on-startup