The operative word in Phil 4:7 is νοῦς (nous - a word that come directly into English with the same meaning and spelling) which according to BDAG means (in this instance):
the facility of intellectual perception (a) mind, intellect as the side of life contrasted with physical existence, the higher
part of a human being that initiates thoughts and plans, eg, Rom 7:22,
23, 25 (b) understanding, mind as a facility of thinking, eg, Luke
24:45, Rom 13:18, ... which surpasses all power of thought Phil 4:7
...
Thus, Paul is effectively saying in Phil 4:7 that the peace of God is beyond understanding, or surpasses anything which humans are capable of fully grasping. This is consistent with another of Paul's statements in 1 Cor 2:9, 10
However, as it is written: “What no eye has seen, what no ear has
heard, and what no human mind has conceived” — the things God has
prepared for those who love him— these are the things God has revealed to us by his Spirit. The Spirit searches all things, even the deep things of God.
Thus, there are clearly things beyond our human minds to grasp or understand. The "peace of God" is said to be one such.
Now about the other passage in 1 Cor 2. Let me quote it context:
14 The natural man does not accept the things that come from the Spirit of God. For they are foolishness to him, and he cannot
understand them, because they are spiritually discerned. 15 The
spiritual man judges all things, but he himself is not subject to
anyone’s judgment. 16 “For who has known the mind of the Lord, so
as to instruct Him?”d But we have the mind of Christ.
This passage perfectly illustrates the important principle, "Spiritual things are spiritually discerned". That is, we cannot understanding anything about the Bible and spiritual things without the enlightenment of the Holy Spirit as John 16:13, 14 makes clear.
Even so, there are some things that we, before we get to heaven, will never understand. We are not God and thus cannot ever fully understand God. This is stated again in Isa 55:8 -
“For My thoughts are not your thoughts, neither are your ways My
ways,”