Based on your description, I understand that you want to clean up log files and restrict trace log disk space usage to ensure SharePoint server has enough space.
To clean up log files, go to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\LOGS to clean up useless log files.
To restrict trace log disk space usage,
(1)Go to Central Administration -> Monitoring -> Reporting -> Configure diagnostic logging -> In the Number of days to store log files section, enter a number -> Select the Restrict Trace Log disk space usage option -> In the Maximum storage space for Trace Logs (GB) field, enter a number.
(2)Go to Central Administration -> Monitoring -> Reporting -> Configure usage and health data collection -> In the Maximum log file size field, enter a number.
A reference about truncate and shrink SharePoint Transaction Logs:
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.