Thanks,
search for scan lines and you’ll get some stuff (about making patterns, and in specific lines and diagonal lines).
as an idea, in photoshop you’ll make a pixel pattern (usually square such as 9x9 px) and then define it as a pattern, which can then be reused.
in illustrator, its vector based so you’ll draw the vectors for your pattern, then enclose them within a square and create a pattern swatch.