Well, if you don't mind, you can just ignore it. It could be a coincidence that your ex saw you on your friend's story. Maybe they were just casually scrolling through and your face popped up. Don't overthink it too much.
It could mean they still have some level of interest or curiosity about you. Maybe they miss you a bit but are too afraid or unsure to reach out directly.
Well, it might be that they're just casually looking without any real intention. Sometimes people do this out of habit. They used to be part of your life and now they just check in on your stories without thinking much about it. But it could also be that they have some unresolved feelings. They ghosted you, but perhaps they still care on some level and are keeping tabs on you through your stories.