How to make two objects in unity rotate at the same angle as if connected?

I could not find another answer to this problem probably because I don’t know what to ask but I am trying to make a cannon that is separated into three parts. It has a stationary base that is primarily aesthetic, a rotating base for when the cannon is rotating to aim left and right, and the barrel which will rotate when aiming up or down. My issue is when I try and rotate the rotating base and the cannon they both rotate in different directions

When I try rotating them together

I am pretty sure it is because the barrel’s X axis is where the base’s Z axis is but the two are not exactly matched up so I can’t just have it change both for the separate objects. I don’t know what to do to make them match up or if there is a better way to go about doing something like this because I am very new. Thanks in advance for any answers people might have

Come on man… Go learn the most basic of Unity first please…

Just Use hicheracy correctly… make then child of the corerct parent…

>Canon
  >Stationary Base
    >Rotatig Base
      >Rotating Barrel