I follow the wordpress codex on moving wordpress to its own directory…I am keeping core file in subdirectory where they were installed and moving index.php and htaccess to root.
steps i follow
1. in wordpress dashboard i change site address url from https://mydomain.com/wordpress to https://mydomain.com
2. copy .htaccess and index.php from subdirectory to root directory
3. edit index.php so that
require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ );