You want to test it against a surface that you know is flat, and you want the camera sensor and your test surface to be parallel.
So imagine you point the camera at a brick wall... set the camera on a tripod at a distance that lets you fill the camera frame with the brick wall ... all the way to the corners of the frame. It doesn't have to be a brick wall... you just want something with detail. You could hang a sheet of newspaper on the wall (it does need to be "flat").
Make sure the camera sensor is parallel to the wall (lens is pointed straight at the wall; level; not angled).
Focus carefully, take some test shots, then import them to your computer and evaluate.
It is common for focus to very fractionally degrade as you get to the corners (the focus plane is not precisely flat, there is some field curvature. Some large professional astronomy cameras actually used curved sensors to deal with the problem.) ... but what you want to know is if the focus is symmetric ... in other words what you don't want is to find that ... say the right side of the image is in focus, but the left side of the image is not (or top/bottom ... or diagonally, etc.) That issue might indicate de-centered optics. Since stars are pinpoints of light, if there are optical flaws, the stars will distort accordingly.
When you do astrophotography, everything in space focuses at the same distance. If you focus anything (a star, the moon, etc.) then "everything" would be in focus. (although if you want milky-way shots then you want to do that when there is no moon in the sky).
In live-view mode, your camera has a feature called "exposure simulation". This means if you set the shutter speed to 30 seconds and set the ISO to max, the camera will amplify the brightness on the live-view screen and it will be a bit easier to focus (don't forget to return the exposure settings to something reasonable before you take your shots -- I only crank up the exposure for focus). Take your time and do a few test exposures, carefully evaluate the test exposures for good focus. You may spend 10 minutes just trying to work out accurate focus ... it's time well-spent. It's really hard to tell if you have good focus on that tiny little LCD screen (you have to zoom in and inspect carefully). Even then I have *thought* had good focus, got home, and once I imported the images I found the focus was a bit soft (a huge disappointment and you wish you had taken more time.)
There is a physical focus aid called SharpStar that works similar to how a Bahtinov focusing mask works for telescopes.
A Bahtinov mask works by using parallel slots cut through a sheet of material. A known property of the wave-nature of light is that light bends around edges and this causes the stars to create diffraction spikes. The slots are cut at angles to create 3 spikes... two form an "X" shape and the other set produces a vertical spike "|". When all three spikes converge at a common center point you have nailed the focus. But one side-effect is that it also blocks about half of the light... making the image even dimmer (and this can make it very difficult to focus in normal camera lenses). The SharpStar mask is clear ... but has grooves etched into it to create the diffraction spikes. This means it doesn't block light and it's a bit easier.
Here's their video showing how it works:
I find these things are easier to use in long lenses than in short lenses. In short lenses (such as your 14mm) you get a wider field of view, filled with more stars, but they don't seem as bright as when you use a long lens. This means the diffraction spikes are sometimes too short to tell if it's working. SO... when you think you're close, take a test-shot (because the longer you collect light, the bigger the diffraction spikes and the easier it is to verify focus.)