Hint

Begin with asking the user for input:

entry = input("Enter something (or type 'exit' to quit): ")

Then, think about using a while loop to keep asking for input until the user types "exit" (in any case). Inside the loop, open a file in append mode and write each entry to it using:

with open("user_inputs.txt", "a") as file:
    file.write(entry + "\n")