I want to achieve something like the image below:
How can I do it?
use this formula:
=ARRAYFORMULA(IF(COUNTIFS(A:A, A:A, ROW(A:A), "<="&ROW(A:A))=1, "first occurance", ))