I want to disable post revisions. Having some issues !!

I have use this code exactly same from the tutorial i have seen How to Disable WordPress Post Revisions - Step by Step (2018) but still having some issues as it’s not working properly or might be i am doing something wrong. Can anyone help me to disable the post revisions ?

define('AUTOSAVE_INTERVAL', 300); // seconds
 
define('WP_POST_REVISIONS', false);

Hello there,

I hope you are doing well today.

That code may not work with the newest version of WordPress.

You can try using one of the following plugins to remove the post revision:

Best Regards,
Support