I suspect this is malware. How do I remove it?
Turn off the Mac, then power it up holding down the shift key. depending on what has infected you that may either disable it or reduce its effect on the system.

Download Malwarebytes (or another) virus scanning app for the mac and run it. Hopefully it will be found and removed. If not perhaps someone here recognizes it and knows how to remove it manually.

Alternatively if you have another Mac and the right cables to connect them together you could boot the affected Mac into target disk mode, and plug it into your other Mac that you have installed AV software on and scan the infected drive from there.

Note that these are preliminary steps. other people may have more and/or better suggestions. Proceed with caution and, if possible, turn off the network on the infected Mac.