Determining whether you can train as an HGV driver while taking medications will be down to whether a qualified medical examiner deems you fit to drive.
They'll make their decision based on the medication, their effects on your ability to drive safely, and the regulations in your country.
After applying for HGV driver training, you’ll have to complete a compulsory medical assessment where your fitness to drive will be decided.
Remember, the safety of you and other road users is the primary concern when operating an HGV. If your medications have the potential to impair your driving, you may be told to refrain from driving until it is safe to do so or swap to an alternative medication.