Can I use Esri JavaScript Api with OGC Services from Opensource Like QGis?
ArcGIS JavaScript 4 library supports several OGC standards, including WMS, WMTS, KML, and OGC API Features. WFS it is supported in version 3 but not yet supported in version 4, it is marked as coming soon although.
You can find much more information on the external data sources that are supported by the API in the documentation (ArcGIS API - External data sources).
If you are only looking for a JavaScript library to work exclusively with OGC services, with that I mean you have no intention of using ArcGIS services, maybe you can go with OpenLayers of Leaflet. Both are major libraries with great communities behind. I would say that OpenLayers is more comparable to ArcGIS JS, in vast functionalities.
Anyways, which one to use depends of many factors, including requirements, expertise, budget, etc.