The global shift towards low-carbon energy systems based on renewable energy sources (RESs) is transforming power systems, with grid-scale inverter-based resources (IBRs) and distributed energy resources (DERs) playing a pivotal role. This project aims to utilize IBRs and DERs to improve frequency control ancillary services (FCAS) while tackling voltage management issues in both current and future power grids. By incorporating real-time dynamic optimization, the project seeks to create an advanced framework for the allocation, control, and coordination of FCAS from IBRs, DERs, and conventional assets, thereby supporting world-wide transition to net-zero power systems.