1 - Taking advantage of your routine
The fetch_all() function by default returns a array
$resultado_select -> fetch_all(MYSQLI_ASSOC);
see how to "print" the array
$resultArray = $result->fetch_all(MYSQLI_ASSOC);
print_r($resultArray);
Returned example
Array ( [0] => Array ( [codinvitelogin] => 12345 ) [1] => Array ( [codinvitelogin] => 23456 ) [2] => Array ( [codinvitelogin] => 34567 ) [3] => Array ( [codinvitelogin] => 45678 ) [4] => Array ( [codinvitelogin] => 03422 ) [5] => Array ( [codinvitelogin] => 23478 ) )
When comparing the variable $invite_cad with the array will always give false
if($invite_cad == $resultado_select){
Use a foreach and check whether the variable value exists in the array $invite_cad
$result = "";
foreach ($resultArray as $item) {   // $resultArray é o array inicial
    if ($item['codinvitelogin'] === $invite_cad) {
        //se o valor da variavel $invite_cad existir no array atribuímos um valor a variável $result
        $result = "cadastrar";
        break;
    }
}
Life that follows :-)
if($result == "cadastrar"){
    $comandoSQL = "INSERT .......             
    $_SESSION['msg'] = "<span style='color: blue';>OK: Administrador cadastrado com sucesso!</span>";
    
}else{
       $_SESSION['msg'] = "<span style='color: red';>Erro: Administrador nao cadastrado com sucesso!</span>";
}
 header("Location: cadastrologin.php");
2 - A more direct way
<?php
session_start();
$servidor = "localhost";
$usuario = "root";
$senha = "";
$dbname = "bancotcc";
$conn = mysqli_connect($servidor, $usuario, $senha, $dbname);
if (!$conn) {
    die("Connection pifada: " . mysqli_connect_error());
}
$invite_cad = $_POST["cod_convite"];
//Utilize a cláusula WHERE que é usada para extrair apenas os registros que atendem a uma condição especificada
$selectinvite = "select codinvitelogin from login WHERE codinvitelogin = '$invite_cad'";
$resultado_select = mysqli_query($conn, $selectinvite);
//resultado da query
$resultado_select = mysqli_fetch_assoc($resultado_select);
if($invite_cad == $resultado_select['codinvitelogin']){
    $nome_cad = $_POST["nome_ent_c"];
    $cpf_cad = $_POST["cpf_ent_c"];
    $tel_cad = $_POST["tel_ent_c"];
    $end_cad = $_POST["end_ent_c"];
    $codgerado = $_POST["codgerado"];
    $senha = $_POST["senhacad"];
    $username = $_POST["user_ent_c"];
    
    $comandoSQL = "INSERT INTO login (nomelogin,cpflogin,telefone,endlogin,codigologinusado,codinvitelogin,senha,username)
    VALUES ('$nome_cad','$cpf_cad','$tel_cad','$end_cad','$invite_cad','$codgerado','$senha','$username')";
    
    $result = mysqli_query($conn, $comandoSQL);  
    
    $_SESSION['msg'] = "<span style='color: green';>OK: Administrador cadastrado com sucesso!</span>";
    
}else{
       $_SESSION['msg'] = "<span style='color: red';>Erro: Administrador nao cadastrado com sucesso!</span>";
}
header("Location: cadastrologin.php");
mysqli_close($conn);
?>
							
							
						 
fetch_all returns a array. You must enter the index "codinvitelogin" when checking if the condition is true. You can also use the query
SELECT codinvitelogin FROM login WHERE codinvitelogin = '$invite_cad';. Use the functionmysqli_errorto verify possible errors– Valdeir Psr