[HELP] My C# Menu refuses to open now

I am making a menu that allows the person using it to open a text file and put in the car id, the car name, and the sub menu it goes in.
Like so:

carID: Name of Car: SubMenu

Here is the issue, after putting in my code for it to start, the menu refuses to open, at all. It is not the fact that the submenus dont display or anything, the whole menu wont display. I have made sure that the array finds the word that I need and all, that works fine. I have removed my code and made it launch in resources and it worked fine without any added UIMenuItems. I will put the code of what I did below.

Important Code Below:
PS. I know what will happen about the whole “multiple submenus can happen if they put it twice,” but I can fix that as I go on. For now, I just want the menu to show up so I can keep on going with it.

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using NativeUI;
using CitizenFX.Core;
using System.IO;


public class CarsMenu : BaseScript
    {
        //Fields
        MenuPool menuPool;
        UIMenu mainMenu;
        UIMenu newCategory;
        string[] cols;
        List<string> cars = new List<string>();
        UIMenuItem newItem;

        public CarsMenu()
        {
            CustomCars();
            

            Tick += new Func<Task>(async delegate
            {
                menuPool.ProcessMenus();
                if (Game.IsControlJustReleased(1, CitizenFX.Core.Control.MultiplayerInfo) && !menuPool.IsAnyMenuOpen())
                {
                    mainMenu.Visible = !mainMenu.Visible;
                }
            });
        }

        void CustomCars()
        {
            //Adds Main Menu
            menuPool = new MenuPool();
            mainMenu = new UIMenu("INSPRP Cars", "SELECT AN OPTION")
            
            menuPool.Add(mainMenu);
            UIMenuItem uiMenu = new UIMenuItem("testets");
            mainMenu.AddItem(uiMenu);

            //Vehicle Setup
            string[] lines = File.ReadAllLines(@"C:\RpServer\resources\carmenu\cars.txt");

            foreach (string line in lines)
            {
                cols = line.Split(':');

                newCategory = menuPool.AddSubMenu(mainMenu, cols[2]);
                newItem = new UIMenuItem(cols[1]);
                newCategory.AddItem(newItem);

                newCategory.OnItemSelect += async (sender, item, index) =>
                {
                    if (item == newItem)
                    {
                        Vehicle v = new Vehicle(0);
                        Ped gamePed = Game.Player.Character;
                        v = await World.CreateVehicle(cols[0], gamePed.Position, gamePed.Heading);
                        v.PlaceOnGround();
                        gamePed.Task.WarpIntoVehicle(v, VehicleSeat.Driver);
                    }
                };
            }

        }

put the secondary function (CustomCars) into the main function(CarsMenu).
i had the same problem with nativeUI menu whenever i called a sub-function it would not display. i was pulling my hair out forever trying to figure out why. the workaround was just to throw everything in the main CarsMenu() function. not sure if there is a better way would be nice to have it working properly
try:
///////

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using NativeUI;
using CitizenFX.Core;
using System.IO;

public class CarsMenu : BaseScript
{
//Fields
MenuPool menuPool;
UIMenu mainMenu;
UIMenu newCategory;
string[] cols;
List cars = new List();
UIMenuItem newItem;

    public CarsMenu()
    {
        //Adds Main Menu
        menuPool = new MenuPool();
        mainMenu = new UIMenu("INSPRP Cars", "SELECT AN OPTION")
        
        menuPool.Add(mainMenu);
        UIMenuItem uiMenu = new UIMenuItem("testets");
        mainMenu.AddItem(uiMenu);

        //Vehicle Setup
        string[] lines = File.ReadAllLines(@"C:\RpServer\resources\carmenu\cars.txt");

        foreach (string line in lines)
        {
            cols = line.Split(':');

            newCategory = menuPool.AddSubMenu(mainMenu, cols[2]);
            newItem = new UIMenuItem(cols[1]);
            newCategory.AddItem(newItem);

            newCategory.OnItemSelect += async (sender, item, index) =>
            {
                if (item == newItem)
                {
                    Vehicle v = new Vehicle(0);
                    Ped gamePed = Game.Player.Character;
                    v = await World.CreateVehicle(cols[0], gamePed.Position, gamePed.Heading);
                    v.PlaceOnGround();
                    gamePed.Task.WarpIntoVehicle(v, VehicleSeat.Driver);
                }
            };
        }
        

        Tick += new Func<Task>(async delegate
        {
            menuPool.ProcessMenus();
            if (Game.IsControlJustReleased(1, CitizenFX.Core.Control.MultiplayerInfo) && !menuPool.IsAnyMenuOpen())
            {
                mainMenu.Visible = !mainMenu.Visible;
            }
        });
    }
}