If I remember correctly, the tile coordinates are based on the lower-left corner of the tile, so if you called this method on (1,1) you might expect that to be within tile (0,0) but it's the next one up and over. That may be accounting for some of your coordinates being off. More importantly, your loop is creating a Vector3 starting at (-15,-15) but that's relative to the world, not the camera's position. So if the camera is at (40,40) you're trying to line up coordinates with tiles that are offscreen. Also keep in mind how many tiles are on screen and the spacing of the labels will change with the zoom level so you'd want to orient your labels in world space, not in relation to the camera.
(Minor note while we're here,
Camera.main is just a shortcut for FindGameObjectsWithTag, and you're doing that 900 times per frame, which is very slow considering there shouldn't be a reason for the camera to become null mid-loop.)
I'm not 100% clear on what your goal is. Are you just trying to get references for development? Or are you trying to have the tile coordinates display in the game, on the tiles?
If you're just looking for references during development, try this:
Vector3 worldPoint = Camera.main.ScreenToWorldPoint(Input.mousePosition);
SomeMethod can just update a text box on screen so you have a constant display of what cell your cursor is on, or you can have it save the cell when you click, or whatever you like.
From there the answer will depend on exactly what you want to do and how you want it to look, but here's a place to start. This will give you the coordinates of the bottom-left and top-right tiles on screen, regardless of camera size or position:
bottomLeft = _grid.WorldToCell(mainCamera.ViewportToWorldPoint(new Vector3(0, 0, 0))),
topRight = _grid.WorldToCell(mainCamera.ViewportToWorldPoint(new Vector3(1, 1, 0)))
You could use that to find a start and end point for your loop and your code might work fine as is from there.
If you want the tiles to display their coordinates during the game, or even in development, it would probably be possible to create a scriptable tile that displays coordinates based on where it is and have those on a separate tilemap underneath or over your main tilemap. Although I'm not sure how you'd render text to a tile. Your OnGUI method should be perfectly fine to start though.