Do httpOnly cookies completely prevent XSS attack? [duplicate]

This question already has an answer here:

  • Does setting httponly prevent stealing a session using XSS? 5 answers

I just tried 2 large websites.

At first, I copied all the cookies and wrote them to the incognito tab with some javascript code. I did not pass the authentication because I did not see any private user information. Then I made another trial, I used the Edit this Cookie extension and unchecked all the httpOnly cookies and wrote them to the incognito tab again. And then I got to see everything being who I was.

As far as I know, there’s no way to get httpOnly cookies by javascript.

So does that mean, simply setting the authenticated cookie with httpOnly flag, XSS can then be completely prevented?