Is my view of the Trinity accurate, and what is exactly the role of the Holy Spirit I am an Atheist from a Muslim background, I would like to know exactly how do Christians think of Trinity (Especially the Holy Spirit)?

Most Muslims see "Trinity" as three separate persons or entities (God, Christ and the Holy Spirit), although they truly believe (according to the Qur'an) that Jesus is a prophet (human), and that he was supported by the Holy Spirit (Ruh Al-Qudus روح القدس in Arabic, or Ruah Ha-Qodesh רוח הקודש in Hebrew).

The reason Muslims think Christians believe in three Gods, is because Qur'an says so, although it does not necessarily reflect what the doctrine of Trinity stands for.

Anyway, the way I think of it personally is as if God is a man (the father), deliberately controlling the movement of a puppet that looks like a human body (Jesus). And that Jesus is not independent of God as a person, in my own understanding of this idea, is that Jesus and God are actually one person, it is just that unlike other humans, who control their own bodies, Jesus is controlled directly by God Himself.

That is an analogy of what I understand when a Christian tries to explain it.

But I still fail to understand the role of the Holy Spirit? is it like the strings used to connect the Body (Jesus, Son) with the Soul (God, Father) ?

Am I wrong here? Thank you.

Note : Although the Holy Spirit is mentioned in the Qur'an, it does not give a definition or account for the word. The Qur'an only states that God sent Jesus as a human prophet, and that He supported him with/through the Holy Spirit.

By the way, there is also a Hadith in Islam, that states that all humans sin, except Jesus.
The Trinity declares that there is only the One Being of God.  A Divine Being is not to be confused with a human being.  Also, God is Spirit.  Before Jesus came to earth to born as a human, he existed in heaven alongside God (the Father) and the Holy Spirit.  John chapter 1 verses 1 to 3 and 14 explain it this way:

In the beginning was the Word, and the Word was with God, and the Word was God.  He was with God in the beginning. Through him all things were made; without him nothing was made that has been made... The Word became flesh and made his dwelling among us.  We have seen his glory, the glory of the One and Only, who came from the Father, full of grace and truth.”

Before Jesus was born of the Virgin Mary, by the Holy Spirit, he was the eternal and uncreated Word of God.  The Word became flesh and dwelt with us.  That’s Jesus.  So the first thing to understand about the Trinity is that Jesus was no mere mortal, born of a woman, but came from heaven to earth to do the will of his Father, who sent him.  His humanity (physical body and nature) came from Mary but his divinity came from his pre-human being.  He was fully human and also fully divine.
Genesis chapter 1 describes how, at the creation of the heavens and the earth, God said “Let us make man in our image.”  God was not speaking to the angels (who already existed) because humans are not made in the image of created angels.  God (the Father) was speaking to the Word (the pre-mortal Son) and to the Holy Spirit.  Here is a brief extract from an article that explains it:

On the last day of creation, God said, “Let us make man in our image, in our likeness” (Genesis 1:26). Thus, He finished His work with a “personal touch.” God formed Adam from the dust and gave him life by sharing His own breath (Genesis 2:7). Accordingly, humanity is unique among all God’s creations, having both a material body and an immaterial soul/spirit.
The image of God (Latin: imago dei) refers to the immaterial part of humanity. It sets human beings apart from the animal world, fits them for the dominion God intended them to have over the earth (Genesis 1:28), and enables them to commune with their Maker. It is a likeness mentally, morally, and socially.  Source: https://www.gotquestions.org/image-of-God.html

Within the One Being of God subsist the three persons of Father, Son and Holy Spirit.  Not three Gods.  Here is a brief description of the roles each play within the Godhead:

The Father is the ultimate source or cause of the universe (1 Corinthians 8:6; Revelation 4:11); divine revelation (Revelation 1:1); salvation (John 3:16-17); and Jesus' human works (John 5:17; 14:10). The Father initiates all of these things.
The Son is the agent through whom the Father does the following works: the creation and maintenance of the universe (1 Corinthians 8:6; John 1:3; Colossians 1:16-17); divine revelation (John 1:1, 16:12-15; Matthew 11:27; Revelation 1:1); and salvation (2 Corinthians 5:19; Matthew 1:21; John 4:42). The Father does all these things through the Son, who functions as His agent.
The Holy Spirit is the means by whom the Father does the following works: creation and maintenance of the universe (Genesis 1:2; Job 26:13; Psalm 104:30); divine revelation (John 16:12-15; Ephesians 3:5; 2 Peter 1:21); salvation (John 3:6; Titus 3:5; 1 Peter 1:2); and Jesus' works (Isaiah 61:1; Acts 10:38). Thus, the Father does all these things by the power of the Holy Spirit.  Source: https://www.gotquestions.org/Trinity-Bible.html

To get a better understanding of how Christians view the Holy Spirit, please read this: https://www.gotquestions.org/is-the-Holy-Spirit-God.html
The reason Jesus never sinned was because he was not merely a human born of a man and a woman.  He was the eternal and uncreated Word of God who agreed to come to earth to save humanity from sin.  His death and resurrection mean that our sins can be forgiven and we can look forward to spending eternity with the Lord God.  No human could atone for the sins of the world.  But Jesus did – because he was God incarnate, God with us in human form.  It’s a big subject, but this article explains it well: https://www.gotquestions.org/Jesus-sinless.html
The Muslim view of Jesus does not agree with the Biblical view of Jesus.  That’s perhaps the reason why your view of the Trinity is not right.  Good question, and I hope you get some good answers.