Correct way to include WP media, in page templates

Thanks for stopping in.

From what I understand about uploading images to wordpress; wordpress compresses uploaded images into multiple different sizes (with help from WP_Smush), to include in different sized containers in your page template.

What I don't know is, the correct way to reference wordpress media, so that you can get the best performance out of the required size.

I can't really reference the "featured image" of the page, because I am inserting multiple images into a template and I often use "Advanced Custom Fields".

What is the correct way to reference media in a custom page template?