I have Nikon D5300 and Nikon 18-55mm AF-P DX VR 3.5-5.6G lens. I am no expert in photography just uses my DSLR to click normal pictures. I always had autofocus on half shutter press and suddenly it is not working. Images are getting clicked, but autofocus on half shutter press is not working. I have not changed any settings. I did factory reset, still no luck.
Nikon cautions that you need to have the latest firmware installed for it to work on the D5500, D5300 or D3300.
The problem is that the new AF-P autofocus motor system only works on camera models originally introduced since about 2013. If your camera is too old, the focus system, even in manual mode, won't work at all, making the lens completely useless with no workaround.
So it sounds like there might be a camera firmware solution for the D5300 - unless you're already using the latest version.
The D5300 User Manual shows the 18-55mm lens does have an AF slide switch on the side of the lens, next to the VR slider there too. The switch is marked A-M, with A being Auto Focus mode, and M being Manual focus (no Auto Focus).
The D5300 "User Manual" on Page 81 and also Page 16 shows this AF slide switch on the lens.
The D5300 "Reference Manual" is much larger and more complete than the "User Manual" and is worthwhile and free from Nikon at https://downloadcenter.nikonimglib.com/en/products/25/D5300.html
And it mentions there is also a Manual focus menu on page 51.