Struggling to add custom graph to my plugin

That’s correct if you wait some time between some minutes and hours the Apache should use your files. This is a caching problem.
The only Apache you need to restart is the one that runs inside your OMD site.

su sitename
omd restart apache