is it unsafe if I used Windows 7?
Yes. Irrespective of using it with old versions of Electrum, unsupported OSs are risky for all kinds of reasons. The web browser your using is likely not supported anymore, and you're likely using it to log into your bank account, right? As long as you're careful you're probably safe, but the risk is still there.
Microsoft still allows you upgrade to win10 or win11 with your win7 key, although it is technically a violation of their terms of use.