As described, you may have screen hardware issue.
A first step is a forced-restart of your iPad - as this will often resolve an isolated issue.
- On an iPad with a Home button: Press and hold the top button and the Home button at the same time. When the Apple logo appears, release both buttons.
- On other iPad models: Press and quickly release the volume up button, press and quickly release the volume down button, then press and hold the top button. When the Apple logo appears, release the button.

If the problem persists, take a screenshot of the iPad - and then examine the screenshot image as captured by the iPad itself.
Take a screenshot on your iPad – Apple Support
Does the line appear in the captured image? Rotate the screen by 90° from Landscape to Portrait orientation - or zoom/resize the image on screen - as this will ensure that the captured screenshot image, when viewed on the iPad screen, does not directly coincide with any display defects.
If the “line” is not present in the screenshot image, then you have confirmed a screen hardware fault that will require repair. By contrast, if the line does appear in the screenshot image, this suggests a software issue that might be recoverable.