How to decrease capitol gains tax after selling our only houese

My husband died in 2020 and I sold our house in 2021, no one lived in that house and it was the only house that we owned. I was living in an RV. Can I claim that as my primary residence?

 

And how do I best minimize  the taxes?