How to set a bool on an ActorComponent from an Actor

First thing, Instead of

Turret->ATurret::SetSwitch();

It should be

Turret->SetSwitch();

Secondly,

Since the component is on another actor,

Cast<ATurret>(GetOwner())

will fail since the Owner is not a Turret and the Turret variable will be nullptr, hence the crash when calling SetSwitch.

Since you want the player to interact with (I assume) a button which turns on the turret rotation. I suggest using an Interface instead.