I haven't heard of this "Oracledb Standalone compiler/editor" that you are using, so consult the product documentation for how to enable DBMS Output, as it's not always enabled by default. You may need to find a menu bar checkbox or include a set server output on command before the start of the PL/SQL block.
Regarding the code, there are several issues that prevent it from compiling. Each statement must be terminated with a semicolon. Also to print a complete line with linefeed, you need to call dbms_output.put_line, because dbms_output.put only adds characters (to allow you to build a line incrementally, for example) and must be followed by put_line or new_line in order to output anything. I'm not sure what IF LOOP; is meant to do.
To separate your output display issue from the program logic for generating prime numbers, I recommend simplifying the code down to the simplest test case that reproduces the issue, for example,
begin
dbms_output.put_line('Hello, world!');
end;
Can you run this? Does your editor display output?
Here is a fixed version of your code:
declare
i number(3) := 2;
j number(3);
begin
-- i := 2; - moved to declaration
while i < 50 loop
j := 2;
loop
exit when((mod(i, j) = 0) or (j = i));
j := j + 1; -- missing semicolon
end loop; -- missing semicolon
if j = i then
dbms_output.put_line(i); -- put_line prints a line. put requires a newline
end if;
i := i + 1; -- missing semicolon
-- exit when i = 50; -- moved to loop definition
end loop;
end;