These SSDs are both totally outdated and it is no longer worth buying a Samsung SSD 980. My recommendation is the Seagate FireCuda 530, which is much faster than a Samsung 980 and can withstand up to 2550 terabytes of writing (no other SSD offers this much). Buying a 512 GB SSD is not recommended because the prices are usually too high and the write performance of 512 GB SSDs is also lower than with a 1TB SSD.
Seagate FireCuda 530 (1000 GB, M.2 2280)