First of all, answer the question of what is the origin of the world, the primacy of matter or consciousness. This question has given rise to two camps: materialism and idealism.
Materialism can be divided into simple materialism (a philosophical doctrine that uses one or more specific material forms to explain the origin of the world. For example, the ancient Greek philosopher Thales believed that water is the root of all things. source), mechanical materialism (the belief that everything in the world can be explained by mechanical principles, and looking at the entire world from an isolated and static point of view, such as the famous saying of the 18th-century French materialist La Metelli, "Man is a machine"), and finally Dialectical materialism believes that the material world is always in motion and change, influencing and interrelated.
Idealism can be divided into subjective idealism and objective idealism. Subjective idealism regards a certain subjective spirit of the individual such as feeling, experience, mind, consciousness, concept, will, etc. as everything in the world. The origin and foundation of the emergence and existence of things, and everything in the world is derived from these subjective spirits and is the manifestation of these subjective spirits, such as Berkeley's famous saying "Existence is perception." Objective idealism believes that a certain objective spirit or principle is an ontology that precedes and exists independent of the material world, and that the material world (or phenomenal world) is nothing but the externalization or expression of this objective spirit or principle, such as Hegel's "absolute spirit".
Also answer the second question, whether thinking can recognize existence. This question can be divided into agnosticism and agnosticism. Agnostics believe that apart from sensations or phenomena, the world itself cannot be known. For example, Kant believes that we can only know the phenomenal world, and we cannot know things in themselves (things in themselves). Agnosticists believe that the world can be known by people. There are only things in the world that have not yet been known, and there are no things that cannot be known. Marxism stands on the standpoint of gnosticism.