You are probably thinking of sea urchins. While not technically fish, they are spiny marine creatures with edible roe (eggs).
Why It Is a Bit Tricky
"Fish" is a broad term: It encompasses a vast variety of aquatic animals, including invertebrates like sea urchins.
Spiny-finned: Sea urchins have spines, but these are not fins. They use tube feet for movement.
Edible: Sea urchins are a delicacy in many cultures, particularly their roe, known as uni.
While there are a few fish with spines, like the sea robin and lionfish, they are not typically considered edible.
If you have other details about the fish you are looking for, I can help narrow it down!