When a product is out of stock on Trendyol, there is no «Ask a question» button.
However, I found a way to ask a question:
<product URL>/saticiya-sor?merchantId=<merchantId>
E.g.:
https://www.trendyol.com/cristina-re/mug-ivory-p-712553361/saticiya-sor?merchantId=654111