Preload Async not loading all assets

How do I correctly use preloadasync to load all my sound assets? Currently half the sounds seem to never get loaded and its random everytime the isloaded bool never turns to true even after running it and waiting.

Is there any way to make sure every sound gets loaded? This isnt a issue with asset permissions since sometimes they load and sometimes they don’t.

Previously I did

ContentProvider:PreloadAsync(Sounds:GetChildren())

But it wasn’t working so now Im running a loop which seems to work better but assets still fail to be loaded completely

for index, asset in ipairs(Sounds:GetChildren()) do
		task.spawn(function()
			ContentProvider:PreloadAsync({asset})
			task.wait()
		end)
	end
local ContentProvider = game:GetService("ContentProvider")
local Sounds = workspace.Sounds -- Assuming Sounds is a Folder containing Sound objects

local function preloadSounds(sounds, callback)
	local totalSounds = #sounds
	local loadedSounds = 0

	if totalSounds == 0 then
		callback(true)
		return
	end

	for _, sound in ipairs(sounds) do
		task.spawn(function()
			ContentProvider:PreloadAsync({sound}, function()
				loadedSounds = loadedSounds + 1
				if loadedSounds >= totalSounds then
					callback(true)
				end
			end)
		end)
	end
end

-- Usage
preloadSounds(Sounds:GetChildren(), function(success)
	if success then
		print("All sounds loaded successfully.")
		-- Proceed with your game logic here
	else
		warn("Some sounds failed to load.")
	end
end)