Can't be solely by account, because I've never had a YouTube account (and only for a short while had a Gmail account), but YouTube definitely makes recommendations based on previous viewings (at the moment it's all "maritime disasters"!).
I discovered long ago that it wasn't by cookies either (as deleting them made no difference), and somewhere heard that it's actually by IP address, which is the only other explanation sans either an account or cookies.
I daresay if you actually have an account, it goes by that. But otherwise it seems they track your IP address.
I just did a test. I have watched an insane amount of Sub videos this week in my browser.
I fired up MS Edge, which I don't actually use and it's not associated to an account and will have no youtube cookies. clicked on Youtube, and went to a video that had nothing to do with subs. It was a trailer for the Netflix show Witcher.
I checked the recommended videos. The first 30 were all related to that one click. All movie/Tv related.
The first non related one was a sports channel called "Bleacher Report" with some basketball content, Which I have never been to before, and I have ZERO interest in Basketball, and then it returns to movie/TV traillers.
Basically it only recommended based on that one click and nothing else. It has nothing to go on.
Furthermore, this says it bases recommendations on your account, and on cookies when not signed in:
Here's how to reset, improve, and remove YouTube's recommendations, so you see videos that are more relevant to your interests across the service.
www.makeuseof.com
Though in this specific case. The "What is Female Eja..." video is the same channel as the Sub video, and it's the source of the recommendation.