From reading around it seems primarily three sources. This article from Guardian is more about how they will face a financial burden now they must govern but gives some clues.
“While the hardline Islamist group has moved in recent years to become more independent of outside financial supporters including Iran, Pakistan and wealthy donors in the Gulf, its financial flows – amounting to $1.6bn (£1.2bn) last year – “
“With the Taliban long subject to international sanctions, they have relied heavily in the past five years on hugely increasing their trade in opium including,”
I have read somewhere else that the WHO estimated 75% of opium production came from Afghanistan in 2020, mostly Taliban controlled areas.
Also, it seems that a lot of the cash spent by USA in Afghanistan for mundane things like food supply ended up in Taliban hands.
So, Wealthy donor individuals and countries, opium trade and USA inadvertently.
Now the have acquired billions in new weapons seized from Afghan former forces and left behind by USA and allies. The incompetence of it all is astounding.