D-Bus Session bus in Beaglebone green wireless in Debian 11.7

I have a Beaglebone Green wireless with the Debian 11.7 OS. I have written a script and moved it to /usr/bin, and the service file is in the /lib/systemd/system folder. I have enabled and started the service, and it shows: BeagleBone bt-accept[1122]: “Couldn’t connect to DBus session bus: Cannot autolaunch D-Bus without X11 $DISPLAY” error.
When I run bt-obex -s -y ~/Downloads command from the terminal, it works well. but it does not work with sudo.
When I run the above command from the terminal with sudo, it shows the same error as it does for the service file.
I will attach screenshots of it; please go through them.