Did the ancients write poems first, the title or the content?
Not necessarily. Some poems have different requirements on the number of words, levels and rhymes of each sentence because of the differences in aphorisms and metrical patterns, so some ancient people will write titles first, some will add them after the main content is created, and some even have no titles, which are added by later generations. For example, many titles in The Book of Songs and Nineteen Ancient Poems are based on the first sentence of the content.