Of course! You were right to cut off all communication with him as he was a
non mahram to you and you were living in sin! Such a person can’t be a
practicing Muslim and he is a predator waiting to get his way with you and
then trash you like garbage! You must repent to Allah while showing deep
remorse and sincerity and never go back to such sins again.
Kindly refer to the following link(s):
Best way to repent By Assim Al Hakeem
https://www.youtube.com/watch?