Two routes: buy one from another player, or run the quest.
For the quest, equip a weapon with 100 proficiency and speak to Aodhan outside Emain Macha Castle about Private Stories. Accept the quest from your quest box and follow it through. Afterwards, Gilmore in the Bangor general shop sells Barri Spirit Dungeon passes for 5,000 gold.
Drop the pass at Barri Dungeon and mine the ores on the 3rd floor — each fossil takes 2x2 inventory spaces, so clear some room. Once they're all mined, take them to Edren, the Bangor blacksmith, to refine them into spirit stones.
Note: the quest can't be started while you already have a spirit weapon or an Eiryl.