I've been trying to set up my raspberry Pi 4B with TOR and then use it as hotspot but none of the tutorials I follow work for me, maybe because they are all for older versions. Please keep in mind I am mew to Raspberry and this is my first project
You can use a tor proxy that will route all traffic from an interface to the Tor network. You have to configure an access point using your favorite setup. It must work as expected before you will start to setup the tor proxy. Then you use the interface of the access point to route its traffic to the Tor entry point. How to do that you can look at How to make Raspberry Pi a Tor router with all kind of network setup using systemd-networkd. It is tested with a Raspberry Pi and up to date operating system Raspbian Buster Lite using systemd-networkd.