if someone else acquired your domain and later you registered it again, there is a good chance that they used this domain as part of a PBN or in some other way. It is quite possible that your domain now has some algorithmic penalties from Google. This is just a possibility, not a confirmed fact.
the second likely reason is that the content pages on your website no longer meet Google's requirements, which have changed significantly over the past four years. As we know, Google is reluctant to index low-quality, templated, and low-value content. So this is also a possible explanation.