Detritus worms, otherwise known as planeria.
This is the first clue imho, these worms are usually down to poor water or poor tank maintenance.
Also the fact the tank has only been running for a couple of months is another indicator, shrimps really do best in an established tank that’s been running for longer than a couple of months. Shrimps tend not to do that well in newly set up tanks unfortunately.
These will undoubtedly affect shrimps as they are more sensitive to water parameters.
A bit more information about planeria for you from a good source.
www.practicalfishkeeping.co.uk