I am trying to model the sides of a car axle, but I end up with ugly results and shading, no matter how I approach it. I could model it as seperate pieces, but the reference object is a single piece.
You could begin with this kind of cylinders, and boolean. You need to avoid boolean when it's possible but this is typically a case where boolean is the best solution imho. The hard part is probably to guess how many vertices for each cylinder, 32 here is probably not good for the long one on X so I had to lower down to 16:
Then once booleaned begin to work a bit, J to join, K to knife, merge vertices with Auto-Merge and vertex Snap activated, etc. At one point you need to give your object a Subdivision Surface in order to test and modify the topology accordingly. Tris and ngons are acceptable as long as they don't create artefacts. Here (image below) it's not finished, just work in progress, it will need bevels on the edges, etc: