Most software available has some freeware counterpart. The problem with freeware is that some of the software labelled that way is either trial (limited version) or malicious (contains either advertising or virus). For this job you can find either :-
1. office suites that will have a database like the old Microsoft Works (not much better than a spreadsheet) as well as spreadsheets that you can sort easily into whatever order you want
2. dedicated CD/DVD cataloguing software that may even acquire track listings from your CDs
3. external catalogues on music/film sites (example
https://www.allmusic.com/blog/post/whats-in-your-collection ) this only works if you've got a solid internet connection.
The virus problem in software can usually be averted by using trusted sources that filter out such things. Some will also try to screen trial software although that isn't always successful
https://download.cnet.com/1770-20_4...e,Linux&searchtype=downloads&licenseType=Free should be a list of free CD/DVD cataloguing software but, reading the reviews, some are definitely trials and others are related software.
The problem with such things is always going to be what you want it for. If it's just to stop you buying another copy, then a simple spreadsheet list should do although there are some flaws to that. If you want to be able to find a particular song but can't remember who sang it or on which record, you'd do best going with the online system or one of the specialist CD catalogues but even they aren't going to be perfect.
I have a few records in my collection that were re-issued with a different title and occasionally a different track list and occasionally there are artists who have issued several untitled records over a period of time.
Note: the software that builds track lists from your CDs won't work with vinyl and may occasionally mis-identify records.