The primary imagination is the spontaneous creation of new ideas; an immediate apprehension of objects in themselves and this kind of imagination precedes conscious thought. It is organic, but not automatic. It requires a transcendent connection with the eternal in nature. The secondary imagination is hindered by the conscious will and so is lesser, subject to the limits of expression. Coleridge is saying that the primary imagination is nearly (or just is) spiritual and unconsciously intellectual, but earthly concerns and limitations do not get in the way. The secondary imagination involves consciousness experience and is therefore less organic and potential misinterpretation. Think of this analogy: Primary Imagination = Fiction and Secondary Imagination = Creative Nonfiction. In the former, everything is created as new and in the latter, some elements of conscious experience interfere (are used) in the creation of the story. This analogy is not perfect; Coleridge would say that the poetic primary imagination is the creative process itself and so would precede and be more organic than writing a novel of fiction.
Fancy is the absence of imagination. It is just reconfiguring already existing things or ideas.
I would say that the first four stanzas where he describes Xanadu are where he’s showing the primary imagination. The first two lines state Kubla Khan did decree this magical land be built. The impression is that Coleridge is apprehending this (from the dream) as if he’s writing the poem as it is being built, the two creative processes occurring at different linear times, but in the primary imagination of manifest creativity, they happen in unison.
The last stanza starts with ‘A damsel’ and this really sounds like a narrative shift or a different narrator or a different function of a consciousness. Here is where the secondary imagination begins. He’s recalling the damsel and her song so there’s elements of his conscious will (in the act of remembering) and the original experience of the song.
‘Could I revive within me/Her symphony and song’ clearly starts the portion where he’s using Fancy because he’s talking about recreating the original event. It would necessarily be an imitation and being a recreation, it would be a copy; his version of the creative event. So, he’s not making anything new. He’s just trying to recall or rebuild the vision from the ideas and experiences already created in the primary and secondary.
However, Coleridge stated that the entire poem came to him in an anodyne-induced dream, so he might say the entire thing was written via the primary (with the exception of anything he may have forgotten and attempts to recall this would be the secondary).