You cannot connect ANY type od CD/DVD/Blu-ray player/burner to ANY iPad.
Sorry.
A CD/DVD/Blu-ray playing/burnng drives take too much power that ANY iPad model is incapable of dealing with.
Also, iOS/iPadOS has no built-in drivers and NO way to install device drivers for such drives.
As far as other types of data drives, procedures vary.
For old school mechanical, spinning glass platter drives, you will need to power these drives using these old drives external, plug-in power source/power adapter block and maybe through the use of an externally powered hub that are specially designed to use with the 2018/2020 iPad Pro models.
Many of these 2018/2020 iPad Pro/iPad Air 4 plug-in USB hubs can be found on Amazon.
Also, all connected drives need to formatted with a single partition using either Apple's APFS or HFS+ formats or Mac/PC Fat32 or exFat formats.
For many portable, compact flash memory style drives ( SSDs ), many can just be directly plugged in and used, after correct formatting, with no additional, external power sources needed.
Compatible, portable, compact SSDs for use with iPads can be found on Amazon.
USB stick drives can be used with that iPad, with the aforementioned correct formatting, with no additonal external power needed, also,
Good Luck to You!