Ren here from the Shopify support team, thanks for the great question!
I believe generally you'll want to use PNG as it's considered a high quality file type which also allows the removal of white space around designs. That being said, each print-on-demand company may have different file types required or needed. You should be able to find their specifications on their individual websites.
Whether you are using Printful or not, they do have some excellent tips for preparing files here.
Also, there are some excellent resources for obtaining print quality files while also supporting other businesses! Check out Creative Market, Graphic River and even Etsy for some fantastic content.
I meant to add that you can check the DPI using software such as Photoshop or Adobe Illustrator.
Often times an integrated print on demand platform will also detect the DPI upon upload and show you the results. You may also be able to google a free DPI detector!