Function CreateOrRetrieveSheet(sheetName As String) As Worksheet
    On Error Resume Next ' Ignore errors while attempting to get sheet
    Set CreateOrRetrieveSheet = ThisWorkbook.Sheets(sheetName)
    On Error GoTo 0 ' Turn error handling back on

    If CreateOrRetrieveSheet Is Nothing Then
        ' Sheet does not exist, create it
        Set CreateOrRetrieveSheet = ThisWorkbook.Sheets.Add
        CreateOrRetrieveSheet.Name = sheetName
    Else
        ' Clear existing content
        CreateOrRetrieveSheet.Cells.Clear
    End If
End Function

Sub ListFolderContentToSheet()
    Dim ws As Worksheet
    Set ws = CreateOrRetrieveSheet("LISTA")

    Dim fldr As FileDialog
    Dim sItem As String

    Set fldr = Application.FileDialog(msoFileDialogFolderPicker)
    With fldr
        .Title = "Select a Folder"
        .AllowMultiSelect = False
        If .Show <> -1 Then Exit Sub
        sItem = .SelectedItems(1)
    End With

    ws.Cells(1, 4).Value = sItem ' Store the folder path in cell D1
    Dim rowNum As Long
    rowNum = 1
    GetFolderContentHierarchical sItem, ws, rowNum, 0
End Sub

Sub GetFolderContentHierarchical(ByVal folderPath As String, ByVal ws As Worksheet, ByRef rowNum As Long, ByVal level As Integer)
    Dim FSO As Object
    Dim ParentFolder As Object
    Dim FolderItem As Object
    Dim FileItem As Object
    Dim currentRow As Long
    
    Set FSO = CreateObject("Scripting.FileSystemObject")
    Set ParentFolder = FSO.GetFolder(folderPath)

    ' List the folder itself
    ws.Cells(rowNum, 1).Value = String(level * 2, " ") & ParentFolder.Path & ""
    ws.Cells(rowNum, 1).Font.Bold = True
    rowNum = rowNum + 1

    ' List the items in the folder
    For Each FolderItem In ParentFolder.SubFolders
        GetFolderContentHierarchical FolderItem.Path, ws, rowNum, level + 1
    Next FolderItem

    For Each FileItem In ParentFolder.Files
        If Right(FileItem.Name, 4) <> ".tmp" Then
            ws.Cells(rowNum, 1).Value = String(level * 2, " ") & FileItem.Path
            ws.Cells(rowNum, 2).Value = FileItem.DateLastModified
            rowNum = rowNum + 1
        End If
    Next FileItem
End Sub

Sub MonitorFolderAndUpdateChanges()
    Dim wsLISTA As Worksheet
    Dim wsChanges As Worksheet
    Dim dictOriginal As Object
    Dim dictCurrent As Object
    Dim folderPath As String
    Dim cell As Range
    Dim tempArray() As Variant
    Dim tempColorArray() As Long
    Dim i As Long
    
    Set wsLISTA = ThisWorkbook.Sheets("LISTA")
    Set wsChanges = CreateOrRetrieveSheet("MODIFICARI")
    
    Set dictOriginal = CreateObject("Scripting.Dictionary")
    Set dictCurrent = CreateObject("Scripting.Dictionary")
    
    wsChanges.Cells.Clear

    ' Get folder path from sheet LISTA cell D1
    folderPath = wsLISTA.Cells(1, 4).Value
    If folderPath = "" Then
        MsgBox "No folder path found in LISTA! Please run the listing first.", vbExclamation
        Exit Sub
    End If

    ' Store existing data and colors from column C
    tempArray = wsLISTA.Range("C1:C" & wsLISTA.Cells(wsLISTA.Rows.Count, "A").End(xlUp).Row).Value
    ReDim tempColorArray(LBound(tempArray, 1) To UBound(tempArray, 1))
    
    For i = LBound(tempArray, 1) To UBound(tempArray, 1)
        tempColorArray(i) = wsLISTA.Cells(i, 3).Interior.Color
    Next i
    
    ' Populate dictionary with initial listing
    For Each cell In wsLISTA.Range("A1:A" & wsLISTA.Cells(wsLISTA.Rows.Count, "A").End(xlUp).Row)
        If cell.Value <> "" And Right(cell.Value, 1) <> "" Then
            dictOriginal(cell.Value) = cell.Offset(0, 1).Value
        End If
    Next cell

    ' List current folder content in a temp worksheet
    Dim wsTemp As Worksheet
    Set wsTemp = CreateOrRetrieveSheet("TempListing")
    Dim rowNum As Long
    rowNum = 1
    GetFolderContentHierarchical folderPath, wsTemp, rowNum, 0

    ' Populate dictionary with current listing
    For Each cell In wsTemp.Range("A1:A" & wsTemp.Cells(wsTemp.Rows.Count, "A").End(xlUp).Row)
        If cell.Value <> "" And Right(cell.Value, 1) <> "" Then
            dictCurrent(cell.Value) = cell.Offset(0, 1).Value
        End If
    Next cell

    Dim rowChanges As Long
    rowChanges = 1
    wsChanges.Cells(rowChanges, 1).Value = "Path"
    wsChanges.Cells(rowChanges, 2).Value = "Change Type"
    wsChanges.Cells(rowChanges, 3).Value = "Last Modified Date"

    ' Find deleted files/folders
    For Each Key In dictOriginal.Keys
        If Not dictCurrent.Exists(Key) Then
            rowChanges = rowChanges + 1
            wsChanges.Cells(rowChanges, 1).Value = Key
            wsChanges.Cells(rowChanges, 2).Value = "Deleted"
            wsChanges.Cells(rowChanges, 3).Value = dictOriginal(Key)
        End If
    Next Key

    ' Find added and modified files/folders
    For Each Key In dictCurrent.Keys
        If Not dictOriginal.Exists(Key) Then ' New file/folder
            rowChanges = rowChanges + 1
            wsChanges.Cells(rowChanges, 1).Value = Key
            wsChanges.Cells(rowChanges, 2).Value = "Added"
            wsChanges.Cells(rowChanges, 3).Value = dictCurrent(Key)
        ElseIf dictCurrent(Key) <> dictOriginal(Key) Then ' Modified
            rowChanges = rowChanges + 1
            wsChanges.Cells(rowChanges, 1).Value = Key
            wsChanges.Cells(rowChanges, 2).Value = "Modified"
            wsChanges.Cells(rowChanges, 3).Value = dictCurrent(Key)
        End If
    Next Key

    ' Clear and update LISTA sheet with current data
    wsLISTA.Cells.Clear
    wsLISTA.Cells(1, 4).Value = folderPath
    wsTemp.UsedRange.Copy wsLISTA.Cells(1, 1)
    
    ' Restore existing data and colors to column C
    For i = LBound(tempArray, 1) To UBound(tempArray, 1)
        wsLISTA.Cells(i, 3).Value = tempArray(i, 1)
        wsLISTA.Cells(i, 3).Interior.Color = tempColorArray(i)
    Next i
    
    ' Delete the temporary worksheet
    Application.DisplayAlerts = False
    wsTemp.Delete
    Application.DisplayAlerts = True
End Sub
from this code I want the information to be organized vertically and hierarchically, each folder and subloader separately, each with its own files, also for column c in the MODIFICATIONS sheet, I keep the formatting, content and colors after each refresh, and all the changes that appear in the MODIFICATIONS sheet copies in the ALL CHANGES sheet, which is kept after each update and between sessions.