Make turret separate blueprint. Then add to spaceship as child actors.
You need some way of communicating with turrets:
Turrets need either interface, or connect to dispatcher (that is created by ship).
Then you update list of targets from that dispatcher or interface.
Each turret gets list of targets as array of locations.
Now you need some logic for turrets to pick their best targets.
So for each turret calculate vector from root of turret to its target.
You have 2 vectors: forward vector of turret and vector to target. Normalize that target vector and calculate dot product of forward turret and target. If that dot product (its cosinus) is in some range (like 0.8 to 1) that means target is in cone of around 20deg ahead of turret. So it can shoot that target.
When turret can shot target you should rotate it (with interpto). To rotate turret use “look at rotation”. You have your current turret rotation and vector to target. Jus do not rotate root of turret (you need this to calculate forward vector). Instead rotate turrets mesh.
Last is checking if turret is aiming at target (or in some tight range, again use DOT product). So if target is like +/- 2deg then fire.