To set the duration for each frame, select all frames by clicking on the first one, then shift-clicking on the last one. Right-click on any frame and choose "Set Frame Duration". Enter the desired duration (in seconds) for each frame.
Preview your animation by clicking the "Play" button in the Timeline panel.
Once you're satisfied with the animation, go to "File" > "Export" > "Save for Web (Legacy)".
In the Save for Web window, choose GIF as the file format, adjust any desired settings, and click "Save".
Choose a location to save the animated GIF, give it a name, and click "Save".
That's it! You have successfully created an animated GIF using Adobe Photoshop.