Use this method if you are comfortable enough with Linux. Please note depending on your linux distribution the procedure might be different.
For this you need to have a ethernet port on your laptop, or use a USB to ethernet adaptor.
First connect your phone to 3G / 4G / 5G, then share your phone's connection to your laptop using USB tethering or by make a WiFi Hotspot.
Activate IP masquerading on your laptop:
iptables -t nat -A POSTROUTING -o <phone-network-interface> -j MASQUERADE
Then, you need to run a DHCP server on your laptop's ethernet interface. Check if your network manager has such function, otherwise you can disable it for the ethernet interface and use other software such as dnsmasq.