Facing error while trying to run dynamic pl/sql
You forgot the comparison operator for the WHERE clause

If you really want to use dynamic SQL (which is not needed for a simple UPDATE statement like that), then you should also pass all values as parameters, not just the student ID.

declare
   sql_stmt     varchar2(100);
   v_student_id number := 1;
   v_name varchar2(20) := 'pantea';
   v_new_stname varchar2(50);
begin
  sql_stmt := 'update student set student_name = :1 '|| 
              'where student_id = :2 '|| 
              'returning student_name into :3';

  execute immediate sql_stmt
    using v_name, v_student_id
    returning into v_new_stname;

  dbms_output.put_line('New student name is: ' || v_new_stname);
end; 
/ 




The "string buffer too small" seems to happen when you are continuing a string literal (constant) over multiple lines. So it's better to open and close the string constants on each line and concatenate them using || rather than embedding a new line in the string as you did.