If someone knows the content of the post then the title of the post will come to you. But before posting on any topic, you must know about it well and post it. And always make sure that the information you share in the post is truthful and informative. So that others can benefit from your post.
But one more thing is that posting should not be rushed. posting should take time. If you post on time, the content of the post will be well observed in front of you and the quality of the post will be good.
That doesn't always happen that the title of the post comes to them, because I've seen a lot of times where people have totally different content within the post while the title is referring to something totally different, and that becomes misleading. It is not always too easy to come up with a perfect title and some people lack these skills.
One needs to work on their writing and understanding abilities in order to come up with perfect titles for posts and threads so that their title can match the content of their post. It is not easy but it is something that one can learn over time.