Yes, you need to delete all rows older than the 20th oldest row every time you insert, if the table should always only have the last 20 rows.
You may have a view that returns the last 20 rows, but your table will grow if all you do is insert.
The best solution would be to use a view for the query, do not delete it every time you insert, but once a day during downtime it starts a deletion that leaves only the last 20 lines.
Just make sure the index column is indexed.
source share