How do I insert text in an ordered list of blocks?

I am working on my first plugin, which will pull data from Spotify to get the songs that you have listened to today.

This is all working fine in testing, with the exception of an inability to properly format the output. At present it looks like this:

whereas obviously I would like it to look like this:

My code is as follows:

async function loadSpotifyData () {
    const endpoint = 'http://localhost:5001/getsongs/?user_id=7f3d60ca90c1d957f0b16e2fd7d811ae16dffb6c'
    const { data: { children } } = await fetch(endpoint).then(res => res.json())

    let results_array = []

    children.forEach(function (item, index) {
        results_array.push(item['track_name'] + " by " + item['artist'])

    let result_string = "🎺 Today you listened to on [[spotify]]:" + results_array

    return result_string

function main () {
    '💿 Recently played from Spotify',
    async () => {
        const { content, uuid } = await logseq.Editor.getCurrentBlock()

              [:h1 "Fetching from Spotify..."]

        logseq.Editor.insertAtEditingCursor (await loadSpotifyData())


  logseq.Editor.registerBlockContextMenuItem('🎺 Spotify integration',
    ({ blockId }) => {
        '🎺 Spotify integration'

// bootstrap

Advice welcome please

Try creating a batch block and using the insert batch block command or alternatively. Instead of adding the blocks to a string in ththe loop use insert block to create a new block. First take the uuid of the original block and update its content using uodateBlock and then run insert block with the uuid parameter being the iiid of the original block and the content being each individual song.

Thank you.

I would really appreciate a code sample.