This line needs changing:
getWidgets().get(307, 162);
Use Options, Widget debugger, hover over the Fish in the cooking dialogue, and it will tell you the correct numbers to use.
Also after stove.interact(), you need to wait(sleep) until the Dialogue comes up. For now, just put sleep(5000); since you are new and just testing.
stove.interact();
sleep(5000);
Eventually you can look into "Conditional Sleeping". This means, your script won't just sleep for 5 seconds, it will sleep until something happens, example:
sleepUntil(no more raw fish left)
instead of
sleep(10000)
Don't worry about that for now.