There is no right or guideline way to get merit. Because merit is up to the discretion of the giver.
I've seen Legendary people give merits for a joke XD. (less than 5 words!)
I think the main guideline is that you have to post something that isn't spam.
You just have to make a reasonable contribution to a thread. Something that people honestly want to read in the thread you're posting in.
That said, there are some strict merit givers who only give merit to people who post long posts, and other merit givers only give merit to people who have been on the forum for a little longer.
There's no right or wrong, all very subjective. But the point is, you have to post something that's meaningful to the thread.
Writing a random essay that's not on the topic of the thread won't get you merit.