There are a few things you can try to troubleshoot this issue:
1.Make sure that the custom configuration file you created is in the correct location for your MySQL version and operating system. For MySQL 8.0.31 on macOS, the default location for the configuration file is /usr/local/mysql/my.cnf.
2.Check the permissions on the configuration file to ensure that the MySQL server process has permission to read the file.
3.Verify that the MySQL server process is actually reading the configuration file by checking the process's command line arguments or by running the 'mysqld --verbose --help' command.
4.Make sure that the settings you are trying to change are actually read by MySQL. Some settings are read by the server at startup, while others can be changed at runtime.
5.If you are still having trouble, you can try specifying the configuration file location when starting the MySQL server. For example, you can use the '--defaults-file' option when starting the server.
6.Make sure that there is no other my.cnf file in the system that may be overriding the configuration you set.