Both the require and add_template_part function are not including the file

Using an URL to include a php file will usually not work. You will need a filesystem path. Depending on where you .php file is located (in this case the template directory), you could use:

include( get_template_directory() . '/myfile.php' );

https://codex.wordpress.org/Function_Reference/get_template_directory