Hi,
Normally, you would need an AirPrint-enabled printer in order to print from an iPad without additional software. A Samsung Xpress M2022W and an M2026W are listed as supported models in About AirPrint - Apple Support. Have you checked whether your printer actually is one of these models from the M202xW series (the manual at http://h10032.www1.hp.com/ctg/Manual/c05790048.pdf#G3.4668359 indicates AirPrint support for the W series)?
Use AirPrint to print from your iPhone, iPad, or iPod touch - Apple Support
Alternatively, you could perhaps check whether the HP Samsung Mobile Print app could be used:
https://apps.apple.com/us/app/hp-samsung-mobile-print/id1301469531?platform=ipad
(M2020 is mentioned as a supported series).
The printer and the iPad must be connected to the same Wi-Fi network (router). Information about the wireless network setup for the printer can be found in the above manual. Depending on the router, it may be possible to use Wi-Fi Protected Setup (WPS) in order to simplify the printer connection.