As mentioned above, square footage of the trailer's frontal area, may be an issue. Check your X's owners manual. The towing section may show a limit on towing certain sized trailers.
Your 5000 lb max tow capacity, may have been calculated (many are) without any passengers or cargo in the vehicle. As you load aftermarket accessories, people, pets, and cargo, your max tow capacity drops along with your available payload, pound for pound. The weight of hitch equipment (installed in your hitch receiver) and loaded trailer tongue weight are counted as cargo weight.
Look in and around the drivers door post (possibly on the edge of drivers door), for a tire / loading decal that shows a "max occupant / cargo weight" (AKA payload). That is what the vehicle is rated to carry. It gets used up by weight of people, pets, aftermarket accessories, cargo, hitch equipment, and tongue weight. It's very common to run out of payload capacity, before you get close to that max tow rating.
Average trailer load (dishes, pots and pans, BBQ, camp chairs, bedding, groceries, water, etc) is 800 - 1000 lbs. If you buy a 4000 lb trailer, it will be close to 5000 lbs when ready to camp.
Average tongue weight is 12 - 13 percent of the loaded trailer weight.
Watch out for salespeople who may tell you " You're OK if the unloaded trailer weight is within your max tow rating".
The closer you get to going over, on either payload or max tow rating, the more unpleasant your towing experience will be.
Example:
Let's say SUV XXX has 5000 lbs tow rating and 1100 lbs payload. (Your payload number could be higher or lower)
The consumer adds 25 lbs of aftermarket accessories, 500 lbs of people, and 150 lbs of cargo (this includes hitch equipment).
The remaining payload is 425 lbs and remaining max tow capacity is 4325 lbs.
Average tongue weight on a 4325 lb (loaded) trailer, would be about 540 lbs.
SUV XXX would be right at max tow weight rating, but, 115 lbs over payload rating.