der Gedanke
thought
A single idea, mental image, or consideration that arises in the mind.
Mir kam plötzlich der Gedanke, dass ich den Herd angelassen hatte.
The thought suddenly occurred to me that I had left the stove on.

thought
Loading your saved state.
thought
A single idea, mental image, or consideration that arises in the mind.
Mir kam plötzlich der Gedanke, dass ich den Herd angelassen hatte.
The thought suddenly occurred to me that I had left the stove on.

'Der Gedanke' is the noun corresponding to the verb 'denken' (to think). It describes the result of the thinking process: an idea or a consideration.
Ich denke oft an unsere gemeinsame Reise.
I often think about our trip together.
'Gedanke' is a weak noun (n-declension). This means that it takes the ending '-n' in all cases except the nominative singular, for example 'den Gedanken' (the thought), 'dem Gedanken' (to the thought), 'die Gedanken' (the thoughts).
Ich kann deinen Gedanken nicht folgen.
I can't follow your thoughts.
The expression 'sich Gedanken machen' means 'nachdenken' (to think) or 'sich sorgen' (to worry). It is used reflexively and always takes the preposition 'über' (about) + accusative.
Ich mache mir Gedanken über meine Zukunft.
I'm thinking about my future.
To express that you have an intention or are thinking about a plan, the expression 'mit dem Gedanken spielen' (to toy with the idea) is often used.
Sie spielt mit dem Gedanken, nach Berlin zu ziehen.
She is toying with the idea of moving to Berlin.
The content of a thought is often explained by a following subordinate clause with 'dass' (that) or an infinitive construction with 'zu' (to).
Der Gedanke, dass ich etwas Wichtiges vergessen habe, beunruhigt mich.
The thought that I have forgotten something important worries me.
The idiom 'in Gedanken sein' (to be lost in thought) or 'in Gedanken versunken sein' (to be absorbed in thought) describes the state when someone is thinking so deeply that they do not notice their surroundings.
Er starrte aus dem Fenster und war ganz in Gedanken.
He stared out the window and was completely lost in thought.
idea
'die Idee' and 'der Gedanke' are closely related because both can be something in the mind. 'Idee' is often used when an inspiration leads to a solution, a project, or a design. 'Gedanke' is more general and can simply be something you think about. A thought does not yet have to be a good or concrete idea. The words can be confused because an idea is also a thought. When it is about a suggestion or a concept, 'Idee' sounds more natural. When it is about thinking, worries, or a single consideration, 'Gedanke' fits better.

Der Gedanke an die Prüfung macht Mehmet nervös.
The thought of the exam makes Mehmet nervous.
Luisa hat eine gute Idee für das Sommerfest.
Luisa has a good idea for the summer party.