DPI or dots per inch means number of dots of ink per inch that a printer deposits on a piece of paper 300 DPI is the standard print resolution of high res output printers work with CMYK format, while p5js and other libraries work with RGB
Convenience store printing in Japan seems to be able to handle 300 DPI
THERE IS NO WAY TO CORRECTLY SET DPI IN FIGMA
Figma and other vector based design tools work with 72 DPI and there is no way to change that. While Figma can be used for creating print designs, it is not ideal since it works with pixels and not inches and dpi.