Variable Assignment and Usage in Oracle
You do not need PL/SQL for that, you can use plain SQL after initializing a bind variable, for example.

variable v_pNBr number;
exec :v_pNBr := 100150;

select * from TARGETTABLE where PROCESSNBR = :v_pNbr;


Or you can simply use:

select * from TARGETTABLE where PROCESSNBR = :v_pNbr;


And SQL Developer will prompt for the value of the variable.

PL/SQL code is executed on the database server and it does not display a resultset on the client. Yes, PL/SQL code can store results in an intermediate memory area on the server, then the client is responsible for getting and displaying that content. Another way is opening a cursor in PL/SQL and returning that to the client. Or you can create a PL/SQL table function.