Every resource I see keeps mentioning how C# or python can be run from your PC to communicate with the board. But is there some way to compile C# or Python code INTO an Arduino sketch that can then be uploaded to the board?
Byte-code interpreted. With a rather large "interpreter."
IIRC, there were some arduino-size boards that claimed to run .net micro (not quite sure if that includes C#) programs directly, based on some relatively powerful ARM chips. They were pretty expensive, didn't catch on, and were discontinued; I'm not sure if there was a replacement.
The microPython (Raspberry Pi Pico) and circuitPython (many Adadfruit boards based on ARM or ESP chips) have gained more traction - they run a python interpreted on the chip. (NOT via a Python to Machine Code compiler.)
None of the AVR-based Arduinos (Uno 3, Nano v3, Nano Every, Mega V3, etc) will run either python or .net interpreters; they simply lack the resources (mostly memory.)
I understand the interpreters won't run on most boards. I meant if there's a way to compile the code directly into machine code/sketch OR into C/C++ which can then be compiled into machine code/sketch.