Unable to declare AOS library in functions

The function get_template_directory_uri() returns the path without trailing slash.
So you need to write

wp_register_script( 'aosjs', get_template_directory_uri() . '/js/aos.js',...)

Note the slash before “https://wordpress.stackexchange.com/questions/328563/js/aos.js”.

What good for is this line, the script file should already be loaded:

<script src="https://wordpress.stackexchange.com/questions/328563/js/aos.js"></script>