@0ROCHlMARU i know what it's like to lose motivation and run out of ideas, i've been there loads of times. here are some things i like to do to keep myself going:
• look into the future - think about when you've finished your book, think about how happy you'll be when you've finished it.
• write things down - if you're struggling with what to write or ideas for your book, write down ideas that you already have and add to the list when you think of new things. that way, you won't be confused and you can see everything clearly, instead of it all being muddled up in your head.
• find inspiration - sometimes, i think about giving up in writing because i can't seem to think of what to write. then i read different books/stories and find inspiration from there (don't plagarise, obviously!). take a few ideas from elsewhere and incorporate them into your story. normally, i go on pinterest and search "writing ideas / writing prompts" and i find a lot of things there that help!
• take a break - if things get too much, take a break. sometimes, a good night's sleep or a week or two away from writing really helps!
• write a different part of your book first - if you're struggling with writer's block, but you know where your story wants to go, and you can't get there, write a differen't part of the story first. writing your favourite part of your book that you've been looking forward to writing can really help with motivation, because it excites you and helps you connect different parts of the story a little better. write something you've been looking forward to writing, and go back to what you were struggling to write after!
i really hope this helps you. know that you're not alone and inspiration is everywhere you go! if you need any more advice, feel free to ask <3