How do I create gridlines in 3D view

How to create gridlines in 3D view, similar to the effect in the figure.

Can you describe your use case (what you would like to use it for)?

Does the grid rotate with the model or remain orthogonal to the camera?
Does the grid scale with the model (when you zoom in, does the grid squares get bigger)?

The grid is mainly used as a reference.
The grid remains orthogonal to the camera.
The grid does not change as the model scales.
Please tell me how to do that. Thank you.