How do you write a poem?
Find a topic that interests you, create a story or meaning, and then structure words that rhyme but convey your point.
Pick a random topic, and then choose words related to it that rhyme, and create sentences from those words.