Not sure what shrimp you got but as mentioned they are very sensitive to parameters, temps and need pretty stable mature tank to thrive…
normally a very well cycled / mature tank of at least 2-6 months is required before placing shrimps in, then you gotta try and keep the temps stable when doing water changes etc… i noticed sudden large fluctuations in temp or parameters can also cause shrimp deaths too…
but basically if water gets too warm that can also cause as many problems as water being too cold, same with parameters and PH levels etc…
its all really a learning curve but once you get the hang of it they are pretty easy to keep and breed, just a bit fiddly at the beginning depending on your tank setup and water quality…