I worked and compiled a document and create a new one. I attempt "Build & View" newly created document but TeXstudio compiles only old one.
TeXstudio allows you to define a given file as a master document. The purpose of this is to ease compiling when working with multiple files. For example when writing a document where each chapter is in a separate file, one still has to compile the main file where the preamble is found, not the chapter file (starting with
\chapter). My defining the main file as a master document under Options --> Root document (in older versions of TeXstudio this is Options --> Define Current Document as Master Document), one doesn't have to switch to this before compiling.
Hence, if you still have your old file open and this is selected as master document, when you try to compile the new file, the old one will be compiled. To fix this, set the new file as master document instead.