Optimization algorithms have come a long way in the last several decades, with the goal of reducing energy consumption and minimizing interference with primary users during data transmission over shorter distances. The adaptive ant colony distributed intelligent based clustering algorithm (AACDIC) is a key component of the cognitive radio (CR) system because of its superior performance in spectrum sensing among a group of multi-users in terms of reduced sensing errors, power conservation, and faster convergence times. This study presents the AACDIC method, which improves energy efficiency by determining the ideal cluster count using connectedness and distributed cluster-based sensing. In this study, we take into account the reality of a system with an unpredictable number of both primary users and secondary users. As a result, the proposed AACDIC method outperforms pre-existing optimization algorithms by increasing the rate at which solutions converge via the utilisation of multi-user clustered communication. Experiments show that compared to other algorithms, the AACDIC method significantly reduces node power usage by 9.646 percent. The average power of Secondary Users nodes is reduced by 24.23 percent compared to earlier versions. The AACDIC algorithm is particularly strong at reducing the Signal-to-Noise Ratio to levels as low as 2 dB, which significantly increases the likelihood of detection. When comparing AACDIC to other primary detection optimization strategies, it is clear that it has the lowest false positive rate. The proposed AACDIC algorithm optimizes network capacity performance, as shown by the results of simulations, due to its ability to solve multimodal optimization challenges. Our analysis reveals that variations in SNR significantly affect the probability of successful detection, shedding light on the intricate interplay between signal strength, noise levels, and the overall reliability of sensor data. This insight contributes to a more comprehensive understanding of the proposed scheme's performance in realistic deployment scenarios, where environmental conditions may vary dynamically. The experimental results demonstrate the effectiveness of the proposed algorithm in mitigating the identified drawback and highlight the importance of SNR considerations in optimizing detection reliability in energy-constrained WSNs.