Since I don't have the advanced license for ArcGIS Pro, I'm trying to create relationship class in other programs.
Would ArcGIS Online support relationship (O-M) created through another program (such as QGIS or FME)?
You cannot create relationship classes in other software. You must create them in ArcGIS Pro. Note, you don't need the Advanced license, just the Standard license which is shown at the documentation page.
This Writing Geodatabase Relationship Classes blog post states:
It is assumed that the relationships have already been created in ArcGIS. This is required, as FME cannot create the relationships, but merely populate them.
and then later states:
As a reminder, this is because relationship classes must be created in ArcGIS and then they can be populated through FME.
There is more information in Introduction to Working with Geodatabase Relationship Classes.