Photoshop tutorial: pattern tile export – saving a pattern tile for another app such as Paint Shop Pro, Photo-paint, Affinity Photo, …

source

How to make seamless patterns using Photoshop actions
CREATE PATTERNS inside of shapes in Adobe Photoshop