Cold anyone help me to understand what happens to the transactions inside an orphan block. Will all that transaction be lost?
An orphan block means that a block was found but in the end isn't relevant (will not be part) on the main blockchain, because another valid block was found and accepted. This is possible since there is not only one possible solution.
But this situation doesn't influence any transaction since you are searching for a block that represents a set of transactions. As explained previously, orphan blocks are not integrated in the (main) blockchain because another valid block was previously found. So that means that the transactions are already part (or "inside") of the previously found block.