The Greek phrase, κατὰ τὴν σάρκα (according to the flesh), or, κατὰ σάρκα (according to flesh) occurs more than 20 times in the NT. Its meaning is rather simple - it is ancient Hebrew idiom for what we would now say, "humanly speaking", or, "from a human point of view", or similar. See John 8:15, Acts 2:30, Rom 1:3, 4:1, 8:1, 4, 5, 12, 13, 9:3, 5, 1 Cor 1:26, 10:18, 2 Cor 5:16, 10:2, 3, 11:18, Gal 4:23, 29, Eph 6:5, Col 3:22, etc.
The phrase should be understood in the light of Rom 8:1-13 where Paul encourages all Christians: "do not walk according to the flesh but according to the Spirit." (v4). That is, "no longer follow our sinful [human] nature but instead follow the Spirit."
This passage in Rom 8 is at pains to stress that not living according to human passions but living a life in step with, or, motivated by, the Holy Spirit is the most important change occuring when a person becomes a Christian. This is precisely because those who live according to the dictates of the Holy Spirit are constantly learning more about Jesus, 1 John 2:6, John 16:13. The great task of the Holy Spirit is to teach us about Jesus (John 16:13).
Paul takes up the same theme in 1 Cor 5:16. V17 says, "Therefore, if anyone is in Christ, he is a new creation. The old has passed away; behold, the new has come." The new person is the one motivated by the Spirit not human passions (= according to the flesh).
In Heb 5:7, "in the days of his flesh" simply means the time when Jesus was human on earth; ie, His 33 years before His crucifixion. Sometimes this is denoted by "His earthly life", or similar.