Whenever I have an idea for a program it would be fun to write, I google to see whether such programs already exist. Usually they do, and when they do, I'm disappointed - I feel like it's no longer valuable for me to write the program.
Recently my girlfriend decided we had too many mugs to store in our existing shelving, so she bought boards and other materials and constructed a mug shelf. It was fun and now we have one that is all her own. If someone walked in and learned she built it and told her - "you know other mug shelves exist, right? You can get them online", I'd view them as somewhat deranged. Obviously a big part of the value is that she built it, that building is cool and fun, and that there aren't others like it.
But that's the kind of thing I've been telling myself when I find other programs exist! So I should look at myself as somewhat deranged, and change my attitude.
One thing I often think is "Yes, 5 people have already written this program, but they all missed important point X." Like, we have thousands of programming languages, but I still love a really opinionated new language with an interesting take.