1. Draw a star shape on the A4 paper.

2. Draw a star on a piece of A4 paper.
3. Draw a star shape on A4 paper.
=====================
Which expression is grammatical?

All three are fine.

All three expressions are grammatically correct. They differ slightly in terms of how they specify the action of drawing a star shape on a piece of A4 paper.

1. "Draw a star shape on the A4 paper." - This expression implies that the A4 paper being referred to is previously mentioned or known to both the speaker and the listener. It suggests that you should draw a star shape on that specific A4 paper.

2. "Draw a star on a piece of A4 paper." - This expression uses the indefinite article "a", indicating any random or unspecified piece of A4 paper. It suggests that you should draw a star shape on any A4 paper that you choose.

3. "Draw a star shape on A4 paper." - This expression omits the articles "the" or "a", and the word "piece", making it more general. It suggests that you should draw a star shape on any A4 paper in general, without specifying whether it is a specific paper or any paper.