What’s wrong in my PHP code? I’m using WordPress Astra Theme and I can’t insert data into my SQL

First, you don’t need connection info when using the global $wpdb. It’s already connected.

Second, if your insert is failing, then the first thing to check would be your data format. If you don’t specify a format, then it is handled as a string. See the docs for WPDB::insert:

An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data. A format is one of ‘%d’, ‘%f’, ‘%s’ (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.

So if your table specifies a specific format required for the column, it may fail if your insert data format doesn’t match the requirement.