If your penalty relates more to your external and / or internal links, be aware that there are many tools available to analyze them and determine their usefulness and quality. To name just two examples, you can use Ahrefs or SEMrush, which will detect problematic links.
Once all of this is done, you can ask Google to re-evaluate your website, or you will have to wait for its next update so that it can be reconsidered.