In order to maximize network duration and attain power efficiency in wireless sensor networks, clustering, and routing are two notable optimization problems (WSNs). The clustering and routing procedure is an example of an NP-hard issue that can be solved using a metaheuristic optimization method. Clustering is a suitable procedure that is frequently used to improve network power efficiency. Concurrently, difficult cluster head (CH) election and potential Base Station (BS) pathways increase energy consumption and cut down the lifetime of the WSN. This paper proposes an Improved Cuckoo Search (ICS) routing method along with Oppositional Artificial Fish Swarm (OAFS) based clustering as a solution to this issue. The OAFS-ICS approach that has been suggested makes good use of OAFS-based clustering to choose the CHs. In this case, a refined Deep Convolutional Neural Network (DCNN) is worn to make predictions about the energy level. The CH parameters like distance to BS (DBS), residual energy, node degree (ND) and node centrality are used to calculate a fitness function (FF). Several scenarios are utilised to calculate the performance of the current technique depending on the number of nodes. Numerous simulations were conducted in order to confirm the supplied model's superiority. The simulation results demonstrated that the OAFS-ICS technique beat the comparison methods in terms of a variety of criteria.