There isn’t really a way to prevent people from ‘stealing’ your story unless you simply don’t share it, ever.
I think it also depends on what your goals are. If you’re just writing for fun and don’t plan to ever publish anything, it’s surely unpleasant to have someone else rip off your work, but it might not hurt you as much as if you had plans to actually publish it.
If you’re seriously planning to publish anything, I’d say only upload first drafts, never the final manuscript, at least not in full.
Also, keep in mind that copyright infringement only really happens to already popular authors as it means that someone uploads their story illegally but doesn’t pretend it’s theirs. Like, if you find copies of Harry Potter on here for example. It hurts the author because they lose revenue.
Plagiarism, on the other hand, is when someone takes someone else’s story and passes it off as their own. This one is much more dangerous and is targeted more at smaller lesser known authors.
So it’s the second instance you want to be wary of.