Unlikely unless there was a vulnerability in the OS. I don’t know if you’ve ever installed an APK manually but you need to confirm with package installer before you do that, so if you didn’t, the only thing that could have happened is maybe your browser got an extension installed. Even then, the browser is supposed to ask for confirmation. If you installed an unknown app, you might have a problem; if not, you’re probably fine. If you don’t notice any weird behaviour on your phone, I don’t think there’s probable cause to suspect you got malware on it.
Seventh-gen i5 should be reasonably usable still. I had a 6th-gen i5 as my work laptop until I gave it to my mom recently.
When the computer is slow, have you looked in task manager to find out what’s at the top of CPU usage?
You can always try resetting the computer (essentially reinstalling Windows) and see if that helps. You probably don’t need to make the USB drive. Go to settings > Updates > Recovery > Reset this PC.
(This is from memory, but it’s pretty close.)
It will ask if you want to do a cloud reinstall. Choose yes. This will download Windows from Microsoft instead of using the factory image that came with your HP, so bloatware will be minimal. Also choose to keep your files; that way it will uninstall your programs and reset Windows to defaults but it will not erase your documents and downloads.
Do make a backup of anything important though, if you have somewhere to store it.