Does arXiv prevent your work from getting scooped, or the opposite?
Preprint services prevent scooping.
Every preprint service puts a date stamp on every document that is published there (and in many cases a DOI as well). That's an effectively unmodifiable record of the time when something went live, at which point nobody can republish your result elsewhere with an earlier date stamp with any reputable publisher.
That said, preprints will not prevent competition for the generation of follow-on research based on a result, nor will it prevent somebody from claiming independent discovery of the same result. Those, however, are just a normal part of doing business in science.