Protecting your writing

So, I have been wondering for myself. How protected is my writing? How does one prover they are the original author?

The reason I ask this is I was thinking of doing a series of posts as essays or short stories with the idea I may put them all together in a book. How easy is it for someone to say it’s theirs and take credit.etc…

Luckily at this time I’m a nobody, but I just want to make sure I have things protected or attributed to me in the future when I may possibly be a somebody.