Displays the last data entered in a column (D) in a different cell (L5)

Hello everyone,
In column D (starting from cell D5) data is added (via a formula) going downwards (so the next data will be in cell D6, then D7, etc.). This data is alphanumeric (generally similar to AX25, AW15, etc.).
Now I would like to see in cell L5 the last data entered in the last cell D (which is now D7, in two hours D8, tomorrow D9, etc.).
How can I do it?

I hope I was clear, if more details are needed I can try to be more precise in the description.

Thanks to everyone!

For numeric values, use:
=LOOKUP(2;1/D:D;D:D)

For text values
=INDEX(D:D;SUMPRODUCT(MAX(NOT(ISBLANK(D:D))*ROW(D:D))))

You can specify a range instead of columns if needed, except in ROW function.

@Steo, I would recommend explicitly limiting the number of rows (the second option in @mariosv’s answer). So in the example with cell D5 try

=INDEX(D1:D99;SUMPRODUCT(MAX(NOT(ISBLANK(D5:D99))*ROW(D5:D99))))

Replace 99 with a suitable number greater than the expected actual row number.

Thank you so much, the formula you gave me works perfectly for my purpose!