There's nothing cheaper than a mass produces mains cable.
See computer / monitor power cables :
https://www.amazon.co.uk/s?k=computer+power+cable&s=price-asc-rank&qid=1556054404&ref=sr_st_price-asc-rankIf you don't want the big IEC connector, you could also go with the mickey mouse plug that's typical on laptop adapters and smaller devices, random result from amazon uk :
https://www.amazon.co.uk/ABC-Products%C2%AE-Cloverleaf-Adapter-Toshiba/dp/B003VRBFJE/ref=sr_1_8?keywords=computer+power+cable&qid=1556054404&s=gateway&sr=8-8Both connectors are easy to find, for the regular computer connector, maybe you can find an old or faulty power supply for free and reuse the connector from there, otherwise there's stores like Farnell , RS-Components, tme.eu , mouser etc which stock them... or you can make the cable permanent to your box by cutting the connector and soldering the wires directly to your transformer leads.
NO you cant use transformers from things like USB chargers ... those are switching power supplies and the transformers are custom, designed to work within a narrow output range and maximum current, and at high frequencies, that's why they're so small...
Easiest for a beginner would be to go with classic transformers and make your circuit to adjust voltage (use a linear regulator, or a cheap DC-DC converter from eBay if you don't care about output voltage quality)
If you go with classic transformer, for a 24v DC 2A output, you'd probably need a minimum a transformer rated for 18v AC and minimum ~ 2A / 0.62 = 3.2A ... so let's say you go with a 24v AC 3.2+A ... or 24 x 3.2 = ~ 75 VA minimum
If you go with toroidal transformers, they can be as lightweight as 1 KG ... here's a bunch of them on TME.eu (18v+ , 75VA+) :
stupid long tme.eu linkThe cheapest one that would fit your needs is 16$ plus shipping, 80VA; 230VAC; 24V; 3.33A; 0.9kg; Ø: 95mm; :
https://www.tme.eu/en/details/tst80w_24v/toroidal-transformers/indel/tst-80-003/(for the transformer above)
You rectify that 24v AC to DC using a bridge rectifier, which gives you a peak dc voltage of around 24 x 1.414 -2 x Diode drop on rectifier or around 31v (so be sure to use 50v rated capacitors after rectifier)
The max DC current would be ~ 0.62 x AC Current = 0.62 x 3.33 = 2.05A
You'll pick enough capacitance to keep the minimum voltage above the threshold you need... let's say 26v minimum ... approximate capacitance with C = current / ( 2 x ac freq x (Vdc peak - Vdc min) = 2A/ [2 x 50 hz x (31v - 26v) ] = 2 / 2 x 50 x 5 = 1 / 250 = 0.004 Farads or 4000 uF .. so you'd probably use at least 4700 uF or 5600 uF
and so on...
You could of course replace it with a switching power supply that outputs 24v or more, and then use your own circuit to make it adjustable...