This is for me a fascinating topic because I am a strong believer in the Prophets although I never met Them yet somehow within myself, I know they are true and sent by God.
The question is - how do we know a Prophet is from God? We have such scriptures as the Bible, the Quran which I accept and also stories about the Lives of Great Educators like Buddha, Christ, Moses, Muhammad, Krishna and Baha’u’llah.
But with no one yet able to describe God how do billions of people believe in Them?
To answer the last point first - I think we have to look at the lives of the people at the time when any prophets were seen as such or as to being seen as such later. The people then were mostly ignorant about so much. Beliefs as to what might be effective in curing various ailments would be widespread but erroneous, given that they just didn't know the true causes of most illnesses and ailments, for example. I think it can be quite difficult for most of us now to place ourselves in such a past. Word of mouth and no doubt public talking was probably what persuaded most to believe in whatever, and they had few if any ways to know the truth of that which was claimed as being true. If they (the prophets) gained some credibility for promoting peace, prosperity, and progress within society (or whatever), which they might easily have done, then this could have impacted as to how they were seen later. Who can say why one cult develops and another doesn't, apart from apparently making the most sense to more people perhaps?
Rhetoric, as to persuading others to believe one's utterances, has always been a strong factor throughout human history - because it often involves producing supportive emotional responses in others - and as to such, those who have mastered this technique will no doubt be likely to come out on top more so than others. I refer you to Trump or Hitler, who might be suitable modern examples of this, and where their messages often appeal to enough for them to succeed.
Now, as to the first, well I am not a great believer in prophets - as to their being whatever is claimed about them - other than what they might espouse, which so often is so sensible enough as to be useful. They often might have good and genuine effects with whatever they project, and hence they might do so much good as to how others perceive them and/or any messages coming from them, but, as we have often seen over the course of history, they do tend to become idolised and often do cause conflict within societies or between societies. This is so because they don't all tend to espouse the same message, or be aimed at all, given that if they did then we would hardly have had the conflicts that we have had over history, even if the core messages might be the same. There are sufficient differences so as to cause harmful division and often conflict too.
But the main reason why I don't tend to believe in the truths as to such prophets is mainly to do with how humans behave, and seemingly have behaved for what we have as recorded history. It seems more natural to me that so many people will simply accept what others say, especially when they are unable to verify any truths, or because they just don't have the ability to think properly. This would have been so for most people in actual fact in times past, given that mass education has been a rather modern phenomenon. Hence why those with much better education and/or knowledge could rise and stay in any hierarchical sense, and especially those who knew how to 'play to the crowd'. And if not the prophets, then they could be used by those who did have any such power.
So my lack of belief tends to come from two aspects, along with others no doubt. Firstly, that our human vulnerabilities opens us up to believing all too readily (or has done), and secondly, it hardly makes much sense to have prophets uttering certain 'truths' when the very fact of them being prophets, and usually localised ones, tends to cause conflict and division. And this has continued on down through history and is still with us. Great prophets then - if you believe in the one that suits your belief system - but not so much for the others who believe in a different prophet.
So for me, any prophets are more the result of humans in action than being as depicted, and more about the probabilities involved as to such - even though I'm not sure there would be any better method for any possible God or gods to interpose or mediate in human lives.
And to answer the title question - I doubt any can know, but rather simply believe they know, especially if they place all faith in such.