How about a Rogue?
Since Sneak Attack damage only applies to one hit per turn, there's only limited benefit to getting additional attacks (namely getting a second chance to hit), but rogues get lots of useful ways to use their bonus action outside of Two Weapon Fighting. Since the feature is built around getting a single strong attack each round, the damage of Sneak Attack is designed to scale to be (roughly) competitive with classes that get additional attacks.
Sneak Attack
Beginning at 1st level, you know how to strike subtly and exploit a
foe's distraction. Once per turn, you can deal an extra 1d6 damage to
one creature you hit with an Attack if you have advantage on the
Attack roll. The Attack must use a Finesse or a ranged weapon.
You don't need advantage on the Attack roll if another enemy of the
target is within 5 feet of it, that enemy isn't Incapacitated, and you
don't have disadvantage on the Attack roll.
The amount of the extra damage increases as you gain levels in this
class, as shown in the Sneak Attack column of the Rogue
You would need to find a way to reliably qualify for sneak attack damage each turn, but that's actually not that hard as long as you have melee fighters in your party since firing at an enemy that is within 5 feet of one of your allies grants you Sneak Attack damage.
Tasha's Cauldron of Everything adds another option: the Steady Aim optional class feature. If you don't move that round, Steady Aim lets you use your bonus action to grant yourself advantage on your next attack roll. This gives you the ability to sneak attack every round (as long as you don't move) and reduces the chance that you'll miss your one attack, thus further reducing the cost of losing your second attack. (Thanks CTWind)
In 5e there are no penalties for firing into melee, so you don't have to worry about that. There is the risk of an enemy getting cover from you ally or another enemy, but taking the Sharpshooter feat lets you simply ignore this cover. It also removes disadvantage from long range (allowing you to Sneak Attack from 320/400 feet away with a light/heavy crossbow) and gives you the option to add a +10 damage to your attacks in exchange for -5 to hit (generally a risky option for a rogue, since a miss robs you of sneak attack damage):
Sharpshooter (PHB, p. 170)
You have mastered ranged weapons and can make shots that
others find impossible. You gain the following benefits:
Attacking at long range doesn't impose disadvantage on your ranged
weapon attack rolls. Your ranged weapon attacks ignore half cover and
three-quarters cover. Before you make an attack with a ranged weapon
that you are proficient with, you can choose to take a -5 penalty to
the attack roll. If the attack hits, you add +10 to the attack's
damage.
As a rogue you're limited to the Light Crossbow (1d8) or the Hand Crossbow (1d6). If you really want the Heavy Crossbow (1d10), your options include:
- Multiclass (1 level of fighter, barbarian, ranger, or paladin give martial weapon proficiency)
- Take the Weapon Master feat using an ASI, or at first level with Variant Human
- Ask your DM about using the optional training rules (DMG 231) to gain proficiency.
- The Hobgoblin race from Volo's Guide to Monsters (VGtM 119) has the trait Martial Training which grants proficiency with 2 martial weapons of your choice, including Heavy Crossbow. (Thanks Nicolas Budig)