On the one hand, 1 Corinthians 12:9 seems to claim that faith is a gift:
4 Now there are varieties of gifts, but the same Spirit; 5 and there are varieties of service, but the same Lord; 6 and there are varieties of activities, but it is the same God who empowers them all in everyone. 7 To each is given the manifestation of the Spirit for the common good. 8 For to one is given through the Spirit the utterance of wisdom, and to another the utterance of knowledge according to the same Spirit, 9 to another faith by the same Spirit, to another gifts of healing by the one Spirit, 10 to another the working of miracles, to another prophecy, to another the ability to distinguish between spirits, to another various kinds of tongues, to another the interpretation of tongues. 11 All these are empowered by one and the same Spirit, who apportions to each one individually as he wills. [1 Corinthians 12:4-11, ESV]
But, on the other hand, other passages seem to indicate that faith can be cultivated / developed through spiritual practices such as prayer, fasting and hearing the word of Christ (i.e. reading the Bible (?)):
20 He said to them, “Because of your little faith. For truly, I say to you, if you have faith like a grain of mustard seed, you will say to this mountain, ‘Move from here to there,’ and it will move, and nothing will be impossible for you.” 21 But this kind never comes out except by prayer and fasting [Matthew 17:20-21, ESV]
17 So faith comes from hearing, and hearing through the word of Christ. [Romans 10:17, ESV]
Question: Is faith a gift or earned / developed through spiritual practices (e.g. prayer, fasting, reading the Bible)?