Do you remove the black vein on the back of the prawns before cooking them?
Yes.
This is called “deveining”, even though it’s not actually a vein.
That’s the shrimp’s intestine.
Which means that… it may contain shrimp excrement.
Yuck!
This also means that it contains bacteria, but properly cooking the shrimp will kill all germs.
The darker the thread, the more dirt it contains.
If you find it disgusting, take it off.
The shrimp will also have a more aesthetically pleasing appearance once the intestine is removed.
You might not have a problem with small shrimp, as their intestines are barely visible.
Just so you know, the shrimp’s intestine has no taste and is not toxic, so it’s up to you whether you want to throw it away or not.