why isn’t require_once working with my path names

Relative paths can be confusing in complex applications like WordPress. Plugin files themselves are included by the scripts that call them, and so relative locations within will be interpreted as those of the file that called them.

It’s always best practice to provide a full path using a magic constant such as __FILE__ or __DIR__, as you’ve discovered.

error code: 523