how to add media query in wordpress?
Your theme’s CSS should do this, not WordPress itself.
If you want to add additional CSS, you can place it in APPEARANCE => CUSTOMIZE => ADDITIONAL CSS.
In this page https://demo.onestopdigitals.com/courses-2/ I want the the courses filter in mobile view should become a dropdown like in this website https://demo.themeum.com/?theme=skillate. you can see the image here: https://ibb.co/pL4RKd2