You have the Linux parted tool to resize disk partitions.
You have the Linux resize2fs tool to resize the EXT4 file system on the root partition (or any EXT2/3/4 file system).
You’d most likely have to connect your storage to another computer that boots Linux.
Or boot from a Linux live CD/USB stick as its not recommended to resize partitions that you’ve booted from already.
pi@noads:~ $ apt show parted
Description: disk partition manipulator
GNU Parted is a program that allows you to create, destroy, resize,
move, and copy disk partitions. This is useful for creating space
for new operating systems, reorganizing disk usage, and copying data
to new hard disks.
pi@noads:~ $ apt show e2fsprogs
Description: ext2/ext3/ext4 file system utilities
The ext2, ext3 and ext4 file systems are successors of the original ext
("extended") file system. They are the main file system types used for
hard disks on Debian and other Linux systems.
This package contains programs for creating, checking, and maintaining
ext2/3/4-based file systems. It also includes the "badblocks" program,
which can be used to scan for bad blocks on a disk or other storage device.
pi@noads:~ $ apt show gparted
Description: GNOME partition editor
GParted uses libparted to detect and manipulate devices and partition
tables while several (optional) filesystem tools provide support for
filesystems not included in libparted.