A couple of things to be aware of: First, notice the limit on input voltages, 0.5V below the lower rail and 0.5V above the upper rail. Don't work outside these boundaries. Those are the MAX limits, there may be other restrictions that won't destroy the device but it might not give the proper output.
Second, your datasheet screenshot doesn't show it but the datasheet should tell you how close to the rails the output can swing. In the good old days, a system with +- 15V rails might work over a range of +-10V for inputs and outputs.
There will also be a limit on how close the inputs can swing toward the rails.
See around 10:00 here:
Here is a paper on 'phase reversal' where the output does weird stuff at various input levels:
https://www.analog.com/media/en/training-seminars/tutorials/MT-036.pdfDave has some good op amp videos as does w2aew