No - it is not an obstacle
PHB on Cover:
Walls, trees, creatures, and other obstacles can provide cover during combat
The weapon created by spiritual weapon is described as "spectral". There is no 5e definition of this word, but it is typically used for 'quasi-real' spell effects that can accomplish specific tasks but which in other ways don't exist or are not physical objects.
Of all the PHB 'spectral' effects, most do not mention any effect of cover or of being an obstacle: Armor of Agathys, Mage Hand, Oath of the Ancients (Nature's Wrath), Spirit Guardians, Spiritual Weapon.
Two spectral effects do not explicitly claim to be obstacles, but produce similar effects:
Guardian of Faith produces a spectral guardian that occupies its space. If it occupies its space, it might be considered to provide cover (DM permitting), although not obscurement - if it is an obstacle, it is a transparent one.
Wild Magic Surge 51/52 produces a "spectral shield" that gives you a +2 to AC and blocks magic missile. While it does not provide cover per se, the bonus to AC is certainly a cover-like effect.
Given that some 'spectral' effects do explicitly block things and others don't, it is best to abide by the principle of 'spells do (only) what they say they do'. Since Spiritual Weapon does not have language about cover or being an obstacle, it cannot provide cover.