On iCloud.com, you can recover files deleted from both iCloud Drive and other apps. However, you can’t recover or restore files you permanently remove.
1- Open Safari and go to the website www.icloud.com
2- Log in with your user name and password then tap on Account Settings link you can find under the "Good morning, John" text
3- Scroll down until you see the "Advanced" section. Tap the "Restore Files" link.
4- Check if your document is included in the restore files list. If so, tap on it then tap the restore button.
5- Open Notes Writer, check if you have the document there on "iCloud" location.
You can find additional information here:
Recover deleted files on iCloud.com