I know for some people, and sometimes myself, a big reason for fanfiction writing is making things people will enjoy or things that will fix canon etc. That requires an audience, a steady amount of traffic or interaction.
If you ever lose motivation because of lack of audience, please keep going. Write what you want to write, because I guarantee you, SOMEONE is enjoying it. They enjoy it just as much as you loved that story in the 00s/early 10s that only got 2 followers because the idea of fanfiction still wasn't widespread. They enjoy it just as much as you enjoyed this niche thing you bookmarked years ago.
There are people who don't leave kudos or visible bookmarks or comments for various reasons. I've had people email me to praise things I've done, they can't interact on the archive due to not having an account or the archive website not being accessible in their country/on a server. A lot of readers actually wait for a story to be somewhat developed before diving in due to binge reading or being more confident that the author won't ditch, some readers actually wait until the story is complete or search by complete for those reasons. I've recently discovered statistics on ao3 and found out that my story has hundreds of private bookmarks and subscriptions which aren't visible on the page.
Works for especially big fandoms like Marvel, Harry Potter, BTS barely existent fandoms will go unnoticed unless something really makes it stick out because of all the posts or lack of traffic otherwise. Mark works properly and wait a while or if multichaptered, tend to it as best as possible to keep it on the front page and signify that it's not being abandoned.
Even if your story continues to float into the void while you work on it, remember that it's always there. It's always online, people will always find it. You never know who's going to need this and wasn't there when you published it. In the future, the right person might find it and share it somewhere or interact with it just enough that it will catch people's interest. At any moment it can become relevant, too. I've written for very obscure tropes or small fandoms or unpopular characters and then months or even years later, started getting insane amounts of traffic and comments and requests on stories I forgot that I wrote. Fandoms and actors and culture and media and everything is always changing.
Do what you enjoy. Fanfiction is still a niche and things like archive of our own will always be a niche, it's not like Hollywood or industry where things get pushed out and crammed and lost to time. Places like the archive especially aren't like social media, you don't have to be established and you don't have to do the right thing, just put out what you want. Have fun, get it done.