Skull cavern mining iridium nodes, or the quarry?
Stardew Valley is a deterministic system. Your loot drops have already been calculated in advance from the game seed. It's possible to not get a prismatic shard for several ingame years, or to get it in the first year.
The most important thing is DO NOT give your first one to the museum or as a gift. Get the Galaxy Sword first.
Boost your luck every way you can.
You can give a rabbit's foot to the truck next to the Jojamart for a permanent 0.25 luck bonus, you can eat things to boost luck, like the spicy eel dish for +1 luck and speed or Pumpkin soup for +2 luck, and obviously hit the mines or cavern on a very lucky day.
Personally, I like to prioritize killing dust sprites in the mines. If you kill 500 of them you can get a burglar's ring from the guild. It boosts the frequency of all drops, and everything has a miniscule chance of dropping a prismatic shard. It also makes farming coal from killing dust sprites very productive.
I just started a game where I got my first shard Winter year one from killing one of those buzzing bugs.
Pretty sure iridium nodes are the highest chance. You could get a fish pond with rainbow trout, which afaik has a 1% chance of making a prismatic shard per day. I just go to Skull cavern on a good luck day with 40 bombs and go to town.
I just buy them from the Dwarf. If you have a steel pickaxe, break the stone on the right side of the main floor of the Mines.