but pls what’s an API or should I say what do they do, where do they exist in this whole web development
An API is an interface/protocol between a programmer and software (can also be hardware but in the case of web development it’s software/server/database). It provides you with some functions (in code) that you can use to create or do something using this software but it only provides you with some functionality. You don’t usually have access to all the functions or data.
There is a pretty good analogy of an API being like a waiter at a restaurant. You (client/programmer) use the menu (a contract) to order some food (make a request) and the waiter (API) takes your order (request) and brings it to the kitchen (server/database/system) where the cook prepares your food (processes your request) and then the waiter (API) brings it back to you (client/programmer).