Nikon's documentation says that you may need to update the firmware on a D5300, although a new one might already be updated. In the Setup menu, under Firmware, you should see C 1.01.
You can select manual focus mode via the quick menu. On the main control screen (i.e. not in menu mode), press the i button and then use the directional control to select the item on the bottom row, second from the left. It says one of four things: AF-A, AF-S, AF-C, or MF. Having highlighted it, press the OK button to edit, then select MF. Manual mode is now engaged.
To focus to infinity, twist the focus ring to the right. I don't think there's any way to easily tell what the focus distance is, but once you see the stars come into focus you just need to twist a bit more to be sure.
(There are non-easy ways to tell what the focus distance is. When you take a photo with a compatible lens it's written into the EXIF metadata. But I don't think that's one of the metadata items that you can see in the playback menu, so you may need take a photo and then to copy it onto a computer or phone with software which lets you read the metadata).