Attaching beam to 4x4 post. The trim appears to be hardwood.

Attaching beam to 4x4 post. That will provide a strong and durable joint.