Will changing the theme of a new WordPress website affect SEO?

I created a new WordPress website and while I was updating a theme there will always be some issues in all the themes I used I am not good at coding and all, I just wanted to know that will change the theme of my website will affect the SEO of the site or not?