Find last element in web page

I need to find the last element in a web page?
I’m scraping a web page with 500+ images in it. The quantity of the images vary from day to day.

The xpath in is:
(the …/div/div[50]… is the 50th image)

In Python it is:
(the [-1] at the end means the last image/element)

The example above is for an image.
There are other elements which I also need to find the last of.
I can’t seem to find to use find elements by “class-name” or “linked text” in

Appreciate any suggestions or solutions
Thank you

You can solve with axes xpath, it can detect element near other element.

Need external tools to detect it because ui vision do not record axes xpath