Get Default store id of website by website id Magento 2.

Magento contains Multi-store functionality for a single website.

Let’s consider Single website has three stores for different presentation,
1. English(store id 1),
2. French(store id 2 Default store),
3. Spanish(store id 3)

When you required default store id, In our case the default store is French,
We need to fetch store id as 2 for default using website id,

You have to fetch current website default store id using programmatically,
You can fetch the current website default store id by the below code snippet.

Call function,
echo $this->getStoreIdByWebsiteId(1);

2 (French is default store and its id 2)