You’d have to attract users with useful knowledge.
The site is filled with posts being only a link and 0 comments. The domain will be pushed down just by the low total score it will get.
It took Reddit perhaps 10 years to get to the top of ranks, and that was with great content
I think Lemmy does set the canonical URLs correctly, always linking to the origin instance as canonical so it should see it as multiple ways to get to the same content.
Ultimately Google should figure it out if done correctly. But the problem remains that the userbase is tiny compared to Reddit, and mostly focused on the same relatively niche topics in the first place so it's just not gonna rank very high unless you search for Linux stuff.
I've mentioned this before, but SEO for Lemmy and Mastodon is particularly poor due to repeat content (since the content is continuously mirrored): https://moz.com/learn/seo/duplicate-content
Tldr- it's not you, search engines don't work well with Lemmy
It does set the canonical URL tags however which should help Google know those are equivalent URLs and to not flag it as duplicate.
But that also means instances have to rank on their own content, none of the fediverse mirrored ones so it'll seriously limit how much the fediverse as a whole can compete with Reddit which have all the content at the same place.
Realistically? For mainstream search? In anything like the top-level results that most people bother to read?
Nowadays, you need to pay Google more than the SEO companies do. Either that, or hope that people specifically search for lemmy posts as part of their search request.