How to exploit xss in vulnerable js librarys?

i found several vulnerable js libraries in website . on google it shows library s are vulnerable for xss , prototype pollution etc, i tried to inject code in parameters but its not working,how to exploit such vulnerabilities?