Absolutely. This is especially true for new writers who don’t have published articles to show as samples.
If you’re asked to provide a specific sample, go ahead and write it. Make sure you save it: You can use it for that application and also provide it as a sample for other freelance jobs you’re applying for.
There’s a limit, though. If the sample required is really long, it might not be worth your while — especially if requires a lot of research to complete. In that case, you might stop at 300 words. That’s enough to show your writing style and some research skills. Let the job poster know that’s what you’re doing, so they don’t think you can’t follow directions.