You can create a folder named "test", put:
manifest.json:
{ "mod" : { "schema_version" : 2, "payload" : { "app_icon" : [ { "id" : "app_icon_01", "name" : "Test", "path" : "app_icon1.png" } ] } }, "manifest_version" : 3, "name" : "Test", "icons" : { "512" : "icon_512.png" }, "version" : "1.2.1" }in it, put icon_512.png and app_icon_01.png (290px x 290px) in it, goto the URL opera://extensions, turn on developer mode, click "Load unpacked" and point it to the test folder to load the extension.
Then, you can goto the URL opera://configure/mods/interface/app_icon, set the mod's icon and restart Opera.
Then, Opera's pinned taskbar icon should be that custom icon.