That email Yahoo sent you is legit. If you had a Yahoo account between 2012 and 2016, you could be eligible for a settlement claim as the result of a data hack.