Maybe something similar happened to you, sometimes we tend to leave God
of last and we give more importance to other things such as studies, work, friends, family, among others.
In Matthew 6:33 it says: So, first seek the kingdom of God and his righteousness, and you will be given everything you need.
Do not forget under any circumstances to put God first :)