How to select the newest rectangle in update function

I don’t see it happening.
I would use pixel perfect collision.
See this thread for an example.