The sun does spin on its own axis. Due to it being a ball of plasma instead of solid body it isn’t a fixed rotation period. The poles rotate every 38 days while the equator is faster at every 24. Sun spots that appear on the side not facing us eventually rotate into view of Earth.