Imam Ahmad rahimahullah stated that the foundation of Islam revolves around three hadith: (1) "Actions are but by intention," (2) "Whoever introduces anything into this affair of ours that is not from it shall have it rejected," and, (3) "The permissible is clear and the forbidden is clear."

Hence, there are a lot of gems we can take from this beautiful hadith of our beloved ﷺ. However, for now let's focus on three:

We must remember that Allah knows our intentions and what is in our hearts although a person may be able to conceal such from other humans. Our intentions are also a part of our deeds and shall be presented on the Day of Judgment

There are two components of every deed: the deed itself and the motive or intention behind it. Both of them must be proper and correct.

As Muslims we should try our utmost best to be fully conscious of every act that we perform. We should not become creatures of habit such that we do not think before we act. Rather, every action in essence becomes an act of worship, as we ensure that everything we do and the intentions behind it, is to seek the pleasure of ALLAH.

(Commentary on the Forty Hadith of Imam An-Nawawi by Sheikh Jamal Al-Din Zarabozo, vol. 1, pg 146)

Reference : https://sunnah.com/nawawi40:1