Don't panic! This happened to me last May.
A smear test is a screen - it is not a diagnosis of cancer. It is used to identify women at higher risk so they can be treated accordingly.
HPV is a virus and is sexually transmitted. It is responsible for >99% of cervical cancers. Now, having the virus does not mean that you will get cancer. In fact, over 80 percent of women will clear the virus within 2 years. It is only when the virus is active that it increases your risk of cancer.
The NHS changed the way they do smears back in 2019/2020. It used to be that they would just look at your cervix for cell changes - and not test for HPV. This meant some women were HPV positive but this was not recognised, as they had normal smears with no cell changes. By testing for HPV, and then looking at cell changes, the NHS can identify women who are at higher risk at a much earlier stage.
As you tested positive for HPV, they would have also looked at your cells for any changes. Did these come back abnormal or normal?
Now, because you have tested positive for HPV (as I did), you will be called for another smear in a years time, rather than the usual three years. In that time chances are the virus will have cleared and all is fine.
If the virus hasn't cleared and they look at your cells and notice cell changes, these cell changes are NOT cancer. It takes approximately 5-10 years for these cell changes to develop into cancer IF they are left untreated. So if they are detected, you would be referred for a colposcopy to 'freeze off' the harmful cells hence reducing your risk of cancer.
I hope that helps and reassure you but please do try not to worry!