Q:

Trying to make a grid of 5 rows by 2 columns for each page but failed on the first page

The objective is to make a grid of 5 rows by 2 columns for each page. Unfortunately, only the first page has a grid of 4 rows by 2 columns. 
How to fix it?
Minimal Working Example
I have tried to make this MWE as minimal as possible and at the same time keep the real scenario remain unchanged. Please don't remove the code that might be trivial.
\documentclass{article}

\usepackage[a4paper,hmargin=2mm,vmargin=2mm]{geometry}
\usepackage{longtable,array}

\newcounter{counter}

\newcolumntype\specifier{|*2{>{\centering\stepcounter{counter}}m{0.5\dimexpr\linewidth-4\tabcolsep-3\arrayrulewidth\relax}|}}

\makeatletter
\def\row[#1]#2{%
        \parbox[c][0.2\dimexpr\textheight-6\arrayrulewidth-\topskip\relax][c]{\linewidth}{\centering #1 \par \vspace{15pt} {\bf #2}}%
        \ifodd\value{counter}
            \expandafter\@firstoftwo
        \else
            \expandafter\@secondoftwo
        \fi
        {&}{\tabularnewline\hline}%
}
\makeatother

\newcommand\finalline{%
\ifodd\value{counter}\omit\tabularnewline\cline{1-1}\fi
}

\usepackage{etoolbox}

\AfterEndPreamble{%
    \topskip=0pt\relax
  \begin{longtable}{\specifier}\hline
}
\preto\enddocument{\finalline\end{longtable}}

\pagestyle{empty}

\begin{document}

    \row[RAM]{Random Access Memory}
    \row[BIOS]{Basic Input Output System}
    \row[MWE]{Minimal Working Example}
    \row[OMG]{Oh My Ghost}
    \row[PS]{Post Script}

    \row[RAM]{Random Access Memory}
    \row[BIOS]{Basic Input Output System}
    \row[MWE]{Minimal Working Example}
    \row[OMG]{Oh My Ghost}
    \row[PS]{Post Script}

    \row[RAM]{Random Access Memory}
    \row[BIOS]{Basic Input Output System}
    \row[MWE]{Minimal Working Example}
    \row[OMG]{Oh My Ghost}
    \row[PS]{Post Script}

    \row[RAM]{Random Access Memory}
    \row[BIOS]{Basic Input Output System}
    \row[MWE]{Minimal Working Example}
    \row[OMG]{Oh My Ghost}

\end{document}

Output

Bonus problem
I just noticed that when there is only a single cell on the last page, an unwanted extra line appear right to the cell as pointed by a red arrow. How to remove it as well?

A:

Here is another answer using the raster library of tcolorbox. I tried to rebuild your example as far as possible, but without the problems you want to remove. Especially, I kept your document content unchanged with exception of the first blank line.
\documentclass{article}
\usepackage[a4paper,hmargin=2mm,vmargin=2mm]{geometry}
\usepackage[many]{tcolorbox}

\AtBeginDocument{%
  \begin{tcbitemize}[raster height=\textheight,raster columns=2,raster rows=5,
    size=fbox,sharp corners,
    center upper,%     <--- alternatively: halign=flush center,
    valign=center,
    boxrule=0.4pt,%    <--- line width
    raster column skip=-0.4pt,raster row skip=-0.4pt,%   <--- negative line width
    colframe=black,colback=white
    ]%
}
\preto\enddocument{\end{tcbitemize}}

\newcommand{\row}[2][]{\tcbitem #1\par\vspace{15pt}{\bfseries#2}}

\pagestyle{empty}

\begin{document}% no blank line here
    \row[RAM]{Random Access Memory}
    \row[BIOS]{Basic Input Output System}
    \row[MWE]{Minimal Working Example}
    \row[OMG]{Oh My Ghost}
    \row[PS]{Post Script}

    \row[RAM]{Random Access Memory}
    \row[BIOS]{Basic Input Output System}
    \row[MWE]{Minimal Working Example}
    \row[OMG]{Oh My Ghost}
    \row[PS]{Post Script}

    \row[RAM]{Random Access Memory}
    \row[BIOS]{Basic Input Output System}
    \row[MWE]{Minimal Working Example}
    \row[OMG]{Oh My Ghost}
    \row[PS]{Post Script}

    \row[RAM]{Random Access Memory}
    \row[BIOS]{Basic Input Output System}
    \row[MWE]{Minimal Working Example}
    \row[OMG]{Oh My Ghost}
\end{document}

UPDATE (follow-up requirements by the OP):
To transform the grid into a sequence of pages where each cell is printed on a single tight page, only a few adaptions are needed. I also changed the \row command to take `tcolorbox' options. This allows e.g. different rule widths for the cards:
\documentclass{article}
\usepackage[paperwidth=10cm,paperheight=5cm,hmargin=5mm,vmargin=5mm]{geometry}
\usepackage[many]{tcolorbox}

\AtBeginDocument{%
  \begin{tcbitemize}[raster height=\textheight,raster columns=1,raster rows=1,
    size=fbox,sharp corners,
    center upper,%     <--- alternatively: halign=flush center,
    valign=center,
    boxrule=0.4pt,%    <--- line width
    colframe=black,colback=white
    ]%
}
\preto\enddocument{\end{tcbitemize}}

\newcommand{\row}[3][]{\tcbitem[#1] #2\par\vspace{15pt}{\bfseries#3}}

\pagestyle{empty}

\begin{document}% no blank line here
    \row{RAM}{Random Access Memory}
    \row[boxrule=3mm]{BIOS}{Basic Input Output System}
    \row{MWE}{Minimal Working Example}
    \row{OMG}{Oh My Ghost}
    \row{PS}{Post Script}

    \row{RAM}{Random Access Memory}
    \row{BIOS}{Basic Input Output System}
    \row{MWE}{Minimal Working Example}
    \row{OMG}{Oh My Ghost}
    \row{PS}{Post Script}

    \row{RAM}{Random Access Memory}
    \row{BIOS}{Basic Input Output System}
    \row{MWE}{Minimal Working Example}
    \row{OMG}{Oh My Ghost}
    \row{PS}{Post Script}

    \row{RAM}{Random Access Memory}
    \row{BIOS}{Basic Input Output System}
    \row{MWE}{Minimal Working Example}
    \row{OMG}{Oh My Ghost}
\end{document}

A:

Here you have a possible solution with raster library from tcolorbox package.
You'll have to adjust some colors and dimensions, but at least first page contains five rows.
\documentclass{article}
\usepackage[a4paper,hmargin=2mm,vmargin=2mm]{geometry}
\usepackage[most]{tcolorbox}

\newtcolorbox{mybox}{sharp corners, width=.5\linewidth, height=0.2\textheight, valign=center, halign=center}

\begin{document}
\begin{tcbraster}[raster columns=2,enhanced, sharp corners, raster column skip=0pt, raster row skip=0pt] 
\foreach \i in {1,...,5}{
\begin{mybox}
RAM\\[1cm]Random Access Memory
\end{mybox}
\begin{mybox}
BIOS\\[1cm]Basic Input Output System
\end{mybox}
\begin{mybox}
MWE\\[1cm]Minimal Working Example
\end{mybox}
\begin{mybox}
OMG\\[1cm]Oh My Ghost
\end{mybox}
\begin{mybox}
PS\\[1cm]Post Script
\end{mybox}}
\end{tcbraster}
\end{document}

