This very likely is a fake Microsoft virus warning/scam page, not proof that your Surface Pro 7 has a Trojan. Microsoft specifically warns that scammers use frightening “Trojan detected” screens that look like Windows/Defender and may remain on screen or play sounds.
Closing the Surface cover does not close the browser, so the page can still be there when you reopen it.
Do this now — don't click anything on that screen
Do NOT click “Remove virus,” “Scan,” “Allow,” or any phone number.
Press Ctrl + Shift + Esc together.
Task Manager should appear.
Find Microsoft Edge (or Chrome, if that's what you use).
Select it → End task.
If there are several Edge processes, end them all.
Restart the Surface.
If Task Manager won't appear:
Press Ctrl + Alt + Delete
Choose Task Manager
End the browser.
If even that doesn't work, hold the Power button for about 10 seconds until the Surface shuts down, then restart it. Microsoft recommends restarting when a scam page cannot be closed.
After it restarts
Don't choose “Restore previous tabs” if Edge asks you to restore them.
Then open:
Windows Security → Virus & threat protection → Scan options → Full scan → Scan now
Microsoft recommends a Full scan if you genuinely suspect malware.