I'm getting strange compiling errors and I still have no idea why.

All compiler errors have to be fixed before you can enter playmode!
0x00007FF715C7759C (Unity) StackWalker::GetCurrentCallstack
0x00007FF715C7AA51 (Unity) StackWalker::ShowCallstack
0x00007FF7143DAD35 (Unity) GetStacktrace
0x00007FF71669AFC0 (Unity) DebugStringToFile
0x00007FF715CA6279 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x0000013EF1B21E7B (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
0x0000013EF1B21D3B (Mono JIT Code) [DebugLogHandler.cs:10] UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[ ])
0x0000013EF1B213D1 (Mono JIT Code) [Logger.cs:61] UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x0000013EF1B2103D (Mono JIT Code) [Debug.bindings.cs:127] UnityEngine.Debug:LogError (object)
0x0000013EF1B20E8B (Mono JIT Code) [SceneView.cs:3376] UnityEditor.SceneView:ShowNotification (string)
0x0000013EF1B20423 (Mono JIT Code) [SceneView.cs:3382] UnityEditor.SceneView:ShowCompileErrorNotification ()
0x0000013EE3D7D3F5 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
0x00007FFB32B4B6B0 (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FFB32AD1D12 (mono-2.0-bdwgc) [object.c:2919] do_runtime_invoke
0x00007FFB32ADAD0F (mono-2.0-bdwgc) [object.c:2966] mono_runtime_invoke
0x00007FF715C00EB1 (Unity) CallStaticMonoMethod
0x00007FF715C00AB1 (Unity) CallStaticMonoMethod
0x00007FF715C00831 (Unity) CallStaticMonoMethod
0x00007FF714422D4D (Unity) PlayerLoopController::SetIsPlaying
0x00007FF714425E78 (Unity) Application::TickTimer
0x00007FF7146E412B (Unity) MainMessageLoop
0x00007FF7146EDB37 (Unity) WinMain
0x00007FF7170336BE (Unity) __scrt_common_main_seh
0x00007FFBE66B7BD4 (KERNEL32) BaseThreadInitThunk
0x00007FFBE7BECE51 (ntdll) RtlUserThreadStart

And I also had another error, but it doesn’t appear anymore in the console:
d3d12: profiler is enabled, but stable power state is not. gpu timing errors are expected.

Do you always get those 4 blank errors? Might be related to this thread: