How to look at data of docker from before restart?

If you do any of these operations you are deleting an old container and creating a new one - it’s not restarting. As you can see from your screenshots, the id has been changed.

Please provide the output of docker ps before you apply changes and after that.