This is very common problem, people often face, even i did face too. When installing moodle latest 3.2+ it checks for enabled support for utf8mb4 charset in MySQL database. This doesn't come by default in MySQL. You need to set few parameters in mysql conf.
On Linux based systems you will want to alter my.cnf. This may be located in '/etc/mysql/'. Make the following alterations to my.cnf:
[client]
default-character-set = utf8mb4
[mysqld]
innodb_file_format = Barracuda
innodb_file_per_table = 1
innodb_large_prefix
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
skip-character-set-client-handshake
[mysql]
default-character-set = utf8mb4
Post changing the values, restart mysql and the error should be fixed now.
Please refer below docuemnt