Here's Martin Luther on the first commandment from the Large Catechism:
A god means that from which we are to expect all good and to which we are to take refuge in all distress, so that to have a God is nothing else than to trust and believe Him from the [whole] heart; as I have often said that the confidence and faith of the heart alone make both God and an idol.
That upon which you set your heart and put your trust is properly your god.
Therefore I repeat that the chief explanation of this point is that to have a god is to have something in which the heart entirely trusts.
Ask and examine your heart diligently, and you will find whether it cleaves to God alone or not. If you have a heart that can expect of Him nothing but what is good, especially in want and distress, and that, moreover, renounces and forsakes everything that is not God, then you have the only true God.
If, on the contrary, it cleaves to anything else, of which it expects more good and help than of God, and does not take refuge in Him, but in adversity flees from Him, then you have an idol, another god.