you can use a command like this and save the document as domainname.txt (You can see this using tools like ahrefs, if the backlink is indicated as spam)
sample
[#These are the domains which are affecting my website. I want to remove them. Thank you
#Here are the domains...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.