Wa `alaykum as-salamu wa rahmatullahi wa barakatuh.
Some acts of worship might have been practiced before the advent of Islam such as fasting. Allah says what means:
“O you who have believed, decreed upon you is fastening as it was decreed upon those before you that you may become righteous.” (Al-Baqarah 2:138)
Fasting in Islam is different from fasting enjoined on previous nation in two ways: 1) the way it is practiced. Fasting in Islam is confined to abstaining from food, drink and sex from dawn to sunset. Fasting in previous scriptures included abstaining from speaking.
2) fasting in Islam is purely dedicated and offered out of full submission and surrender to the command of Allah. This is different from fasting which is not meant for Allah’s sake. This is the case of all other religious duties which are different in the way they are practiced and in the goal for which it achieves.
Allah Almighty knows best.