Google’s John Mueller said on Twitter that you should keep URL redirects active for as long as possible. If you change domains, keep the old domain to keep the redirects active.
I'd usually try to keep redirects in place for as long as possible, at least for a year so it's definitely been reprocessed a few times. In practice, they often remain in place for multiple years.— 🍌 John 🍌 (@JohnMu) April 27, 2020
Usually if the domain registration drops, then you can't do anything like redirects. This is one of the reasons why we recommend keeping domains registered for a longer time, even when moving.— 🍌 John 🍌 (@JohnMu) April 22, 2020
How to check the redirects on your website
Among many other things, the website audit tool in SEOprofiler checks the redirects on your web pages: