Point it at your log files, pick how often and how many to keep, and get a /etc/logrotate.d file plus the dry-run command to prove it works before the disk fills.
A program keeps writing to the file it opened, even after logrotate renames it. With create, logrotate renames the log, makes a fresh empty file, and you must tell the program to reopen its logs, usually with a postrotate reload or a signal. With copytruncate, logrotate copies the log and empties the original in place, so the program never notices; it works with anything, but lines written between the copy and the truncate are lost. Prefer create plus a reload when the program supports it.
This logrotate generator writes a drop-in for /etc/logrotate.d with the directives that matter: rotation by time (daily, weekly, monthly) or by size, how many old logs to keep, maxage for time-based cleanup, compress with delaycompress, dateext for dated file names, missingok and notifempty so empty or absent logs do not raise errors, and either create with mode and owner or copytruncate. It adds a su line when logs live in a directory writable by a non-root user, which modern logrotate requires, and a sharedscripts postrotate block to reload your service once per rotation.
On most current distributions a systemd timer, logrotate.timer, runs it once a day; older systems use /etc/cron.daily/logrotate. Daily is the smallest interval unless you schedule it more often yourself. Check with systemctl list-timers logrotate.timer.
logrotate only checks sizes when it runs, normally once a day. A size directive also replaces the time-based schedule. To rotate on time but also when a file grows too large, use maxsize, and run logrotate more often if the log can grow fast.
logrotate refuses to rotate logs in a directory that a non-root user or group can write to, because that user could swap the files for symlinks. Add su with the directory's owner and group, which this generator does when you fill in the su fields.
Not for messages that go to the journal; journald rotates its own files using SystemMaxUse and related settings. logrotate is for applications that write plain text files, such as nginx, Apache, or your own programs.