how to make my fish swim freely in my 2d game platform?

i really dont have scripts right now so any suggestions is highly appreciated

Moving from left to right is easy:

In an Update method, just increase the fish’s x position. When he’s off the screen, destroy him or set he x position to be off the left side of the screen, so he can swim back on.

Moving up and down is harder.
If you don’t want him to jitter vertically, you’ll need to use a timer to switch his direction, or set up a method to easy in-and-out between a high y position and a low y position.