If your internet plan has a limit, or a server’s provider bills traffic, you want totals over weeks. Live tools forget everything when you close them.
vnstat has a small daemon that records the counters in the background:
sudo apt install vnstat
vnstat -i eth0
Then ask for the period you care about:
vnstat -i eth0 -h
vnstat -i eth0 -d
vnstat -i eth0 -m
Those are hourly, daily and monthly tables, each with received, sent and total. For the current rate, there is a live mode:
vnstat -i eth0 -l
Replace eth0 with your interface name from ip -br link.
The daemon only reads counters the kernel already keeps, so it costs next to nothing, which is why I would leave it running on any box with a data cap.
History starts at installation, so right after setup the tables are nearly empty. Give it a day. It counts everything on that interface, including traffic that stays on your local network, so the total can be much higher than what your provider counts. On a machine with Docker or a VPN there are several interfaces, and the same bytes can show up on more than one of them.
Further reading: vnstat man page
Going deeper: Keep a domain pointed at your home with Cloudflare DDNS on Unraid