Ok, I found the solution. It is possible to add the following command in the Obsidian shell plugin:
open "obsidian://open?file=$(find . -name "*.md" -type f -not -path "*/.*" -print0 | xargs -0 ls -rt 2>/dev/null | head -1)"
looks for the .md file with the oldest modification date in the vault’s root folder and its subfolders