What actually happens when a PDF becomes a JPG
A PDF is a set of drawing instructions: place this font here, stroke this vector there, paint this embedded photo in that box. Nothing in the file is a picture of the page as a whole. Converting to JPG means rasterizing — running those instructions and painting the result onto a fixed grid of pixels.
That grid size is the only decision that really matters. A US Letter page is 8.5 by 11 inches, so at 150 DPI you get 1275 by 1650 pixels, and at 300 DPI you get 2550 by 3300. Once the page is pixels, the text is no longer text: it cannot be searched, selected, copied, or reflowed. That is the trade you make in exchange for a file that opens anywhere, previews in every browser and email client, and can be dropped straight into a web page or social post.