Dear respected Haeshan Niyarepola,
Good day! Thank you for posting to Microsoft Community. We are happy to help you.
I’m sorry you’re having a problem but based on your description we can work together to resolve it.
For the situation you encountered, we deeply understand the inconvenience caused and apologize for it.
As per your description, I understand you have document library in the format of a compact list view, and you want when you double click a folder it will always show stored files as Tiles view as a default.
I'm Sorry we cannot create views for folders views in SPO, we can set default view only apply to list and document libraries levels and not to any Folder level, there is not out of the box feature to set the view to the folders level.
We feel your pain due to this limitation and we’re really feel sorry for it. However, we appreciate your understanding. I do understand the inconvenience and apologize for it.
However, you can set/ change the List view to Tiles as default in a SharePoint online document library(not a Folder Level). via in your document library, click on the "Tiles" link and then again click on the "Save view as" which will open a popup.
Enter a name like Tiles view which will then appear as below:
Once you click this, the Tiled view will be the default view of the library level, each Folder contain/Follow same view.
Since, we cannot create views for folders views in SPO as default, we can set the view to the Folders that are created from the Content Type. So, as a workaround, you can create a multiple folder content types in your SharePoint Online site and add those folders content types to the Document library, and you can create views and set it for each Folder Content Type.
Please understand that our initial reply may not always immediately resolve the issue. However, with your help and more detailed information, we can work together to find a solution.
I'm sorry and I apologize for that.
Appreciate your patience and understanding and thank you for your time and cooperation.
Sincerely,
Waqas Muhammad