Hello! I have stopped working database, and because of my stupidity I have not .ldf file and I have a useless backup which is very old. As you can now recover .mdf file? Just attach the file is not a good idea. and how to restore it I do not know. In the Internet I found a lot of recommendations for Microsoft SQL Server 2014 but not for Microsoft SQL Server 2016. Detach wasn't proper. I don't know what else to do?
If the only backup you have is a really old one, I am afraid there are no many options to try. You may try to recover data from transaction log. I am not an SQL server expert, but I would suggest you to search official documentation on Microsoft web site. It's practically impossible that there are no precise instructions for recovery and backup of a recent product like SQL server 2016.