For example, if I finished a topic on the computer science field and graduated as a master degree, could I change to a topic within the psychology or any other field. Just because I'm more interested in doing research in psychology.
You can always change your field, but it may not be trivial to do so. Study in a new field, and getting accepted in to a program usually assumes certain prerequisites. If you don't already have those, you will need (a) to get them somehow and (b) to convince others that you have the skills.
People change their minds about what they want to do. Others recognize that, so there are no hard barriers. But there may be a long period of study to achieve what you want.
Also, study of some fields, like CS or mathematics or statistics may make some things in other fields easier as many of the tools used in research generally are based on one or more of those things.
But you may have an easier path overall if you spend some time exploring your options before you set out on the journey.