In my early days when my bitcoin wasn't worth a lot of money I used to keep my private keys in renamed txt files hidden somewhere on my computer. I'd take a normal text file, change the extension into something like "infinity.dll" and hide it somewhere. That's not proper security, but still many times better than some people, who store these on gmail accounts, cloud servers, or password managers.
A good way to keep the private key is through a text file and change the extension, but it is not the best way of course. In any case, it is not wise to talk about this method in public forums because you will draw the attention of hackers to try to find such files and examine them to obtain the private key.
It is also better to use an encryption program to encrypt the file so that hackers cannot open it even if they find it, or to use a Word file instead of a text file and encrypt it with a strong password and change the extension so that the file type is not known.
Text file? Even if you change its extension, anyone could change it. It's very easy, not to brag, but if you work in IT or information technology, changing the extension of the text file or any file will not help because if someone gets that file, they can easily convert it and access it.
But using an encryption programme is the best option, as it's not easily hacked if they don't have the encryption key, and it will also encrypt not just the password but the content as well, so even if they can decode the password, they still can't read and use the contents. The best way to secure private keys is by memorising them if you can, because nothing can remain inside your mind. Well, it's impossible always because there's a limit for human minds, so I guess the safety of private keys will depend on how much we can secure them; it depends on us, the owners.