Unity scripting - Script one can't find script2 via getComponent but script2 can

Hi! So my title pretty much says it when i try to access script2 from script1 via variable.GetComponent<Script2>() it show it like it’s not declared but when I try to call script1 from script2 it’s working as intended! I got no idea from what it could be I tried to reset my solution explorer in my visual studio! I tried with monobehaviour but script1 couldn’t see script2 f
or some reason!

Maybe script2 is not a public?