Home page 404 may be solve below way as per your Issue
Issue: Store Configuration
Your store configuration point to wrong CMS page.
CMS Home page was deleted or recreated, or you were experimenting with single store / multistore. What you need to do is :
Login to admin>Navigate to Stores > Configuration>Select General > Web
tab >open Default Pages section>Set correct value for CMS Home Page
option
Option value can be overrides on different scope level.
Scope switch located in top left corner. It is recommended to check option value from the Store View scope.
flush the cache in System > Cache Management or via console command
Issues: URL Rewrite
Under certain circumstances product or category can have empty request_path value. To fix it:
login to your store database with any database manager ( like phpMyAdmin or HeidySQL )
check if you have any records with empty request path by running following
& delete those entries. It can be done manually or with SQL
MySQL> SELECT * FROM url_rewrite WHERE request_path='';
MySQL> DELETE FROM url_rewrite WHERE request_path='';
MagentoCLi>php bin/magento c:f