Hi,
Yes. You can claim private residence relief for the period that the property was your main residence.
Please have a look at the guidance at helpsheet HS283.
HS283 Private Residence Relief (2024)
There is a calculator below, which also has a link to the online capital gains service, so that you can report any gain and pay the tax due, withing the 60 day period.
Tax when you sell property
Thank you.