There is a saying that religion is for those that fear hell and spirituality is for those who have been to Hell! In other words when after lifetimes of many ups and downs, dramas and sufferings, our mind gets to a point in its evolution where it loses interest in the transitory, short lives pleasure of the world. Especially with the pain and sufferings that come with worldly pleasures when they are gone. Instead we want something deeper and longer lasting, which spirituality can provide. So the search begins inwardly instead of outwardly in this transitory world.
Other differences are that religion is based on fear of God whereas spirituality is based on love of God. Religion is based on dogma and blind faith, whereas Spirituality is based personal experience and practices, as well as rationality. It’s 90% practical and 10% theory. Religion is the reverse with scriptures being central and personal experiences subservient to the scriptures.
Religious people can be spiritual as well and most religions have branches that promote spirituality of some kind, for example, Christian mysticism, Muslim Sufism, Zen Buddhism, Taoism and some indigenous practices.