Brand new from VW dealers = astronomical. Roughly £2K for mechatronic replacement with labour etc. A whole gearbox, over twice that.
For used prices, have a look on ebay. Generally around the £500 - £700 mark for a good used box, depending on mileage. Avoid anything dirt cheap as it'll likely be fooked.
Mechatronic packs can be sent away for repair to companies like BBA Reman. I think they charged around the £500 mark last time I researched it but has probably gone up considerably now, inline with everything else post covid.
The most common cause of failure on early DSGs was circuit board contamination, caused by too much sulphur in the oil. VW changed the oil shortly after these issues surfaced, so that particular problem should be rare now, otherwise, it's just wear and tear on the actuator solenoids. Regular oil changes is the key to long life. Same applies to the engine.
The gearbox itself is bomb proof, so that shouldn't ever need replacement.
Clutch packs are only a weakness with aggressive remaps. Standard cars should never need a clutch pack unless it has intergalactic mileage.
All car weaknesses are the victim of massive internet exaggeration. DSG is very reliable if looked after, but if it's giving you the fear, perhaps consider the manual GTI instead. They aren't completely free of trouble either but the repair costs are considerably cheaper.