Deductions & credits

I owe $9***n in tax this year.  Again because of a stock sale/capital gains event.  That is clearly over the $1000 lower limit that is suggested to generate an "underpayment penalty"    Since I did not know/foresee in 2019 that I would be selling stock and owing capital gains in 2020,         Will I be charged an underpayment penalty?

 

Is there any way to avoid an underpayment penalty?