I build a TYPO3 Extension. And I use for the TypoScript Folder the Files as .ts. For the IDE PhpStorm is this better I use .ts.
But I see in other Extensions the File as .txt.
What is better?
You should use the file ending .typoscript
for newer TYPO3 versions.
This was introduced in TYPO3 8.7, see changelog: Feature: #78161 - Introduce .typoscript file extension
Using .txt was deprecated in 9.3, see Changelog Deprecation: #81686 - Accessing core TypoScript with .txt file extension has been deprecated
As already mentioned, .ts is not such a good idea as it is used for Typescript.
See also the official TypoScript coding guidelines