One thing I have believed for years, and that I have shared with my children and many adult learners in my presentations and workshops over the years, is a quote by Henry Ford.
As a writer, you must truly have confidence in yourself and your abilities in order to succeed as an author. If you allow negativity or doubt to creep into your thoughts as you try to put words on a page to create a message to readers, you will surely falter.
Take the time to prepare yourself by learning the writing craft, understanding the publishing process and creating a vision or business plan for yourself before you take on the task of writing your first book. Like anything else in life, if you are going to be successful, you have to put in effort upfront to develop the knowledge and skills needed for the task(s) before you.