Allah has told us that he will forgive all sins for the one who repents to Him. He says (interpretation of the meaning):
“Say: ‘O My slaves! who have transgressed against themselves (by committing evil deeds and sins)! Despair not of the Mercy of Allah, verily, Allah forgives all sins. Truly, He is Oft-Forgiving, Most Merciful’” [Az-Zumar 39:53]
How to repent from Shirk
With regard repentance from Shirk in particular and the acceptance thereof, Allah says (interpretation of the meaning):
“And those who invoke not any other god along with Allah, nor kill such person as Allah has forbidden, except for just cause, nor commit illegal sexual intercourse and whoever does this shall receive the punishment. The torment will be doubled to him on the Day of Resurrection, and he will abide therein in disgrace; Except those who repent and believe (in Islamic Monotheism), and do righteous deeds; for those, Allah will change their sins into good deeds, and Allah is Oft-Forgiving, Most Merciful.” [Al-Furqan 25:68-70]
Allah mentions the disbelief and Shirk (associating others with Allah) of the Christians, then calls them to repent. He says (interpretation of the meaning):
“Surely, disbelievers are those who said: “Allah is the third of the three (in a Trinity).” But there is no god (none who has the right to be worshipped) but One God (Allah). And if they cease not from what they say, verily, a painful torment will befall on the disbelievers among them. Will they not turn with repentance to Allah and ask His forgiveness? For Allah is Oft-Forgiving, Most Merciful.” [Al-Ma’idah 5:73-74]
No matter how great the sin, the forgiveness, generosity and kindness of Allah is greater.
All you have to do is to turn to Allah , regret what you did and resolve not to do it again. Then receive the glad tidings of the bounty and mercy of Allah, for Islam wipes out whatever sins came before it, as the Prophet (peace and blessings of Allah be upon him) said to `Amr ibn Al-`As (may Allah be pleased with him): “O `Amr, do you not know that Islam wipes out whatever came before it.” (Narrated by Muslim, 121 and Ahmad, 17861)
And the Prophet (peace and blessings of Allah be upon him) said: “The one who repents from sin is like one who did not sin.” (Narrated by At-Tirmidhi, and classed as sound by Al-Albani)
If a person repents to Allah, Allah accepts his repentance and forgives him. Allah says (interpretation of the meaning):
“And He it is Who accepts repentance from His slaves, and forgives sins.” [Ash-Shura 42:25]
“And verily, I am indeed forgiving to him who repents, believes (in My Oneness, and associates none in worship with Me) and does righteous good deeds, and then remains constant in doing them (till his death.)” [Ta-Ha 20:82]
We have to think well of our Lord and hope that He will accept our repentance, for Allah says, “I am as My slave thinks I am.” (A Qudsi Hadith narrated by Al-Bukhari, 7066 and Muslim, 2675) According to Ahmad with an authentic chain of narrators: “I am as My slave thinks I am, so let him think whatever he wants.”
Read full article here https://islamqa.info/en/answers/34171/is-shirk-forgivable