Nukes are pretty useless in actual space combat. Nukes are deadly because of the blast wave that annihilates everything, the intense heat that melts everything and the radiation. Space is a vacuum and thus has no medium (no materials, no matter), this effectively counteracts the blast wave (waves of all kinds need something to pass through) and the heat (the absolute lack of any surrounding matter means nothing gets heated or melted). As for radiation, definitely not as bad as you'd think. there is a crap ton of radiation in space, thus all space ships and, expectedly, space suits are suited to combat this
Since nukes are typically impact sensitive, they do not cause any damage past the impact surface. And since nukes are unconstrained explosives, most of the energy exerted in the explosion will go anywhere else other than the actual impact surface, especially due to the pressure difference between the vacuum of space and the inside of the nuke
That said, conventional ballistics are far better since they penetrate the target causing interior damage (more forces contained and diverted to the target) and the lack of gasses to pass through means that the projectile will not slow down and thus penetration capabilities not reduced over distance