So if one of my prompts inspired your story, that’s amazing and exciting and I’m 100% okay with you writing & publishing it. :)
If you found a prompt online, you might want to double check with whoever shared it to see if it’s okay for you to build your story from it.
I feel like—for the most part—if prompts are shared freely to help inspire creativity in others, they are available for anyone to write about. But sometimes it’s still good to double check if you’re not sure.
You can also always give credit to others who have inspired/helped you in the acknowledgements of your book.