The reason why the shrimp is bitter: the shrimp line has not been removed, or the shrimp is not fresh. The juice in the shrimp head will flow out if it is cooked for a long time, which will also cause the shrimp meat to be bitter.
The correct way is to choose fresh shrimp, then remove the heart, stomach and other internal organs of the head, and then pick out the shrimp line on the shrimp back with toothpicks or other tools. You can also cut the shrimp back with a knife and divide the shrimp in two, so that the shrimp line can be easily removed.