OK, so the Sun emits x-rays - quite beautifully - and they’re associated with its magnetic activity, related to convection and rotation…
But what of hot, massive stars?