First to clear any confusion
your heading says TexStudio and your message says TexWorks
As I understand it these are two (of many) alternative editor interfaces to LaTeX
As I understand it they both have their own native PDF viewers
SumatraPDF is often prefered by LaTeX users to replace those or other related output viewers
Part of the solution may depend on the latex engine you are using (e.g. MiKTex or LiveTex or other)
for TeXstudio try https://www.alperyazar.com/blog/2014/09/create-search-link-between-texstudio-sumatra/
for TeXworks it can be more difficult to find a good re-configuration guide however at one time I thought that IF MiKTeX installer finds SumatraPDF already installed it is supposd to do the necessary re-configuration for you !
however I can no longer find a link ?