Did you use Turbo Tax?
Maybe you didn't finish filing it or it Rejected. When you log into your account you should also see the status and if it was Accepted or Rejected, Started, Printed, Ready to Mail, etc. what does it say?
If you didn't get the 2017 refund way back in 2018 why did you not question that 2 years ago ???
All you can do now is to print, ink sign and mail in the return as requested by the IRS notice ... once they process the return the refund will be released.