What is Shakespeare trying to communicate about life in this passage spoken by the character Macbeth?

In this passage Shakespeare is talking about life through the words of Macbeth.

Shakespeare is telling us what Macbeth is feeling and his point of view because his wife just died and he is about to be killed. he said “it is a tale told by an idiot full of sound and fury signifying nothing” this means that life is just a test and in the end it signifies nothing. I believe he said this because his wife has just died and he is feeling sorrow. He said “life’s but a walking shadow a poor player that struts and frets his hour upon the stage” this means that life is like a poor actor playing a small part that just wants to stay on stage for longer and make money for their family