I have a virus on my laptop.
Could I remove it by resetting Windows 7 to factory settings?
Yes, of course.
Yes No Maybe.
Anyone who uses operating systems online for which support is no longer available has lost control of their security concept and deserves every conceivable malware. You will have the same problem again soon, I promise.
Download Malwarebytes as free- (test) version (free) https://www.malwarebytes.com/mwb-download/thankyou/ and let it scan your laptop. Anything of concern then comes into quarantine and can remain there or be deleted by you if necessary. Then it is clean again. The fact that there's no longer any support for win7 is not so tragic when using protection programs. Should you install virus protection, e.g. Avast. LG
There are no updates for Windows 7 anymore. This means that the malware you have discovered may exploit existing gaps. Removing them would only be a temporary solution.