Yes, you can limit the space a TM backup takes, at the level of the drive partition.
Time Machine will fill up all the available space on the partition you use for the backup. If you want to store data on the drive other than the Time Machine backup, you can use Disk Utility to create separate partitions on the drive [note: you must format with MacOS Extended (Journaled), not APFS, for TM to work under Catalina; I think Big Sur TM can use an APFS drive]. The different partitions will mount as separate drives, and you can select the one you want as a TM backup (a good rule of thumb is a backup capacity of ~2.5x the amount of data you need to back up, which is ideally not more than ~80% of your internal drive capacity).
For example, I have a 5 TB external drive on which I have 5 partitions of different sizes, four of them are used for TM backups of 4 Macs in the house, and one partition is to back up other files.
As a side note, if a file is on your internal drive that's backed up with TM, there's no point in storing that same file on a different partition of the same drive you use for the TM backup, and if that file is not on your internal drive but only on the one external drive, where is the backup for that file? In my case, I have a 10 TB NAS for local TM backups in the house and storage of family media that's not on anyone's internal drive; the 5 TB external drive is for an offsite copy of those TM backups and the family media.