The way would be to exclude components in the exclusion procedure. As mentioned above, this starts with deactivating all plugins.
It would also make sense to change the theme to a standard theme such as TwentyTwentyFour.
If the message still appears, you could also try selecting a different file. If the message does not appear with the other file, it is due to the file originally used.
If that doesn’t help either, you could debug the PHP code, always following the path that WordPress takes to interpret the shortcode. This requires appropriate knowledge of PHP and WordPress. If you don’t have this, find someone who can help you. You can find someone like this here, for example: https://jobs.wordpress.net
Another tip: you can also use the file with the shortcode in a fresh WordPress installation, just like I did. No plugin, just the standard theme. Only if you also receive the message in this constellation could it be a bug in WordPress.
Finally, please note: you will only receive a PHP notice. This is not an error, nor is it a warning. It’s just an anomaly that indicates an inaccuracy in the data used at that point. You can also suppress the message via PHP settings if it does not affect the content.