How to include jQuery when no header and footer on the page

Though uncommon, you can use wp_print_scripts( ['jquery'] ) for explicit output.

Note that you might hit issues with hooks firing in unexpected ways and such. Generally all WP pages on front end should just implement header/footer properly.