Output File Name

You should read this resource about Taking Screenshots | Unreal Engine 4.27 Documentation.

You can take screenshots using blueprints as well.

You can use the filename=PATH to set the path and name of the image.