hey, I have this problem too, and i have looked at all the workarounds and things that might help, but nothing actually does anything.
I have Windows 10 OS, alongside a GOG copy of Terraria (I see that here there is Steam) and every time i try opening the actual game it says this