You will need to consult an Accoutant in advance BEFORE you cash out your position! Also you need to be aware that any stock you sell within 6 months of purchase will be will incur Capital Gains Tax at a much HIGHER level than if you sold it at 12 months or longer. Just be aware of that!
If I were you I would Google this and also get in touch with an Accountant.
There are options. Google opportunity zone funds for example . But as a poster said above ... find a good accountant - tax planner. This is one area you Don’t need to yourself.