My Dad was a carpenter his specialty was framing. A couple of his brothers, while also carpenters, were into the finish side of the trade. They were called finish carpenters. Keep in mind that in those days the finish carpenters built all of the cabinets on site. I don't know where the term trim carpenter comes from. I'm on the east coast.
Depending on where you are from, carpenters can be called a variety of things, some might not be nice.
For stick built, or work involving the construction with dimensional lumber, they could be called "rough carpenters", or "framing carpenters", or just "framers".
The term "trim" comes in for those that added trim to the work, like window and door casing, crown moulding, base moulding, etc.
Other work could be classified as a specialty involving general carpentry, such as staircases, decks, roofs, facades, and docks.
At one time the term "carpenter" referred to an individual that built an entire house. The term "carpenter" has become more specialized. There are ship/boat building "carpenters" known as "shipwrights". Woodwork carpenters that process lumber or work wood, can be called "millwrights". Carpenters have had the duties at times to build cabinets and furniture for homes. There wasn't always furniture stores.