MyPersonalSearch is a browser extension that is classified as potentially unwanted program (PUP) or adware. It can modify your browser settings without your permission, including your default search engine, homepage, and new tab page. In this case, it seems that when you clicked "Agree" to allow Safe Search on Z library site, the site may have also installed the MyPersonalSearch extension on your browser.
Although MyPersonalSearch is not a virus or malware, it can cause unwanted browser behavior such as displaying pop-up ads, redirecting your search queries to sponsored websites, and collecting your browsing data. It is recommended to remove this extension from your browser to restore your preferred settings and prevent potential privacy and security issues.