I think I've solved my question if someone also has such a problem, then here's what I did first, I thought that if I didn't run the .cpp file itself, but run the compiled one.exe so the whole Russian language in this case begins to be written in utf-8 encoding and is correctly entered into the database. also, for correct output to the console, I added the following code to the main function
setlocale(LC_ALL, "ru");
SetConsoleCP(65001);
SetConsoleOutputCP(65001);
if you follow my method, everything will work, although I understand that most likely there are ways for the IDE to work correctly if there are other solutions, I will be happy to listen to them and thank you to everyone who tried to help