Close. The CIA is thought to have funded the Mujahideen, funneling money and arms through Pakistan. Some of them would become the Taliban later.
As for Al Queda, it’s possible that they did as well, but generally thought to be unlikely. The reason being is that Bin Laden had more than enough money personally since his dad was a wealthy construction magnate with ties to the KSA royal family.
As a side note, the push by the US and KSA to put religious extremists in Afghanistan to fight the Soviets undoubtedly played a role in the strength of the Taliban and Al Queda in the 90’s.