I've been trying to create a basis for a Procedurally Generated map using a Tile map.
However at 4 points in my code. I continue to get
Invalid argument for "set_cell()" function: argument 2 should be "Vector2i" but is "int".
and
Invalid argument for "get_cell_source_id()" function: argument 2 should be "Vector2i" but is "int".

the following code portions show where the errors are occuring.

func create_h_corridor(x1: int, x2: int, y: int):
	for x in range(min(x1, x2), max(x1, x2) + 1):
		set_cell(x, y, get_tileset().find_tile_by_name("Floor"))
func create_v_corridor(y1: int, y2: int, x: int):
	for y in range(min(y1, y2), max(y1, y2) + 1):
		set_cell(x, y, get_tileset().find_tile_by_name("Floor"))
func create_room(room: Rect2i):
	for x in range(room.position.x, room.position.x + room.size.x):
		for y in range(room.position.y, room.position.y + room.size.y):
			set_cell(x, y, get_tileset().find_tile_by_name("Floor"))
func is_floor(pos: Vector2i) -> bool:
	var tile_id = get_cell_source_id(pos.x, pos.y)
	return tile_id == get_tileset().find_tile_by_name("Floor")

and the entire code goes

extends TileMap

@export var map_width: int = 50
@export var map_height: int = 50
@export var room_min_size: Vector2i = Vector2i(5, 5)
@export var room_max_size: Vector2i = Vector2i(10, 10)
@export var max_rooms: int = 15

var rooms = []
var seed = 0

func _ready():
	randomize_seed()
	generate_dungeon()

func randomize_seed():
	seed = randi()
	randomize()

func generate_dungeon():
    # Clear existing tiles
	clear()

	for i in range(max_rooms):
		var room_size = Vector2i(
			randi_range(room_min_size.x, room_max_size.x),
			randi_range(room_min_size.y, room_max_size.y)
		)
		var room_pos = Vector2i(
			randi_range(1, map_width - room_size.x - 1),
			randi_range(1, map_height - room_size.y - 1)
		)
		var new_room = Rect2i(room_pos, room_size)
        
		var failed = false
		for other_room in rooms:
			if new_room.intersects(other_room):
				failed = true
				break
        
		if not failed:
			create_room(new_room)
			if rooms.size() > 0:
				var prev_room = rooms[rooms.size() - 1]
				connect_rooms(prev_room, new_room)
				rooms.append(new_room)

func create_room(room: Rect2i):
	for x in range(room.position.x, room.position.x + room.size.x):
		for y in range(room.position.y, room.position.y + room.size.y):
			set_cell(x, y, get_tileset().find_tile_by_name("Floor"))

func is_floor(pos: Vector2i) -> bool:
	var tile_id = get_cell_source_id(pos.x, pos.y)
	return tile_id == get_tileset().find_tile_by_name("Floor")

func connect_rooms(room1: Rect2i, room2: Rect2i):
	var center1 = room1.position + room1.size / 2
	var center2 = room2.position + room2.size / 2

	if randi() % 2 == 0:
		create_h_corridor(center1.x, center2.x, center1.y)
		create_v_corridor(center1.y, center2.y, center2.x)
	else:
		create_v_corridor(center1.y, center2.y, center1.x)
		create_h_corridor(center1.x, center2.x, center2.y)

func create_h_corridor(x1: int, x2: int, y: int):
	for x in range(min(x1, x2), max(x1, x2) + 1):
		set_cell(x, y, get_tileset().find_tile_by_name("Floor"))

func create_v_corridor(y1: int, y2: int, x: int):
	for y in range(min(y1, y2), max(y1, y2) + 1):
		set_cell(x, y, get_tileset().find_tile_by_name("Floor"))

Any help would be greatly appreciated.

It sounds like you're trying to use Godot 3 code with Godot 4, or vice versa. There were many changes from Godot 3 to Godot 4, including the parameters for methods like set_cell().

https://docs.godotengine.org/en/3.6/classes/class_tilemap.html#class-tilemap-method-set-cell
https://docs.godotengine.org/en/4.3/classes/class_tilemap.html#class-tilemap-method-set-cell

Use Help / About to see the exact Godot version you're using, and ensure that you're using the documentation for that version.