This question already has an answer here:
Lord Vishnu took matsya avatar during the end of 6th Manu and saved Vaivaswata from pralaya. But there's also a story of Vishnu taking Matsya avatar to save vedas. When did that happen? Is there a huge timeline difference between the two avatars?