The spectrum or the whitespaces that are not being used by licensed or primary users (PUs) can be sensed and operated by the unlicensed or the secondary users (SUs) in the cognitive radio networks (CRN) in such a way that there is no impact on the activities of the primary users. One mechanism for topology management is referred to as clustering. This organizes the nodes in logical sets so that the performance of the network is enhanced. The objectives of clustering include supporting collaborative tasks like channel access and channel sensing alongside network stability as well as scalability which is critical for cognitive radio (CR) functioning. The channel availability being dynamic, it changes with time as well as location, thus novel clustering algorithms must be formulated to tackle these issues that are inherent to CRs. This paper proposes a lowest ID clustering algorithm which chooses a certain node as the cluster leader which has the lowest ID. This leader is referred to as cluster head (CH). The other algorithm that selects a node having the highest number of neighbouring nodes as the CH is referred to as the maximum node degree clustering algorithm. For obtaining optimal radio configurations and performance improvements, the genetic algorithm comprising selection, crossover and mutation is embedded in the CR. In order to optimize the allocation of spectrum for greater efficacy and fairness, the artificial bee colony (ABC) algorithm, a meta-heuristic optimization algorithm is incorporated. It has been shown that the proposed technique leads to a greater performance compared to the other techniques.